Skip to content

Commit

Permalink
appease rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
SlakrHakr committed Nov 15, 2024
1 parent 82bfb3b commit 25c51aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions lib/grape/dsl/headers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ module Headers
def header(key = nil, val = nil)
if key
if val
unless val.is_a?(String)
warn "Header value for '#{key}' is not a string. Converting to string."
end
warn "Header value for '#{key}' is not a string. Converting to string." unless val.is_a?(String)
header[key.to_s] = val.to_s
else
header.delete(key.to_s)
Expand Down
4 changes: 2 additions & 2 deletions lib/grape/endpoint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,6 @@ def build_helpers
Module.new { helpers.each { |mod_to_include| include mod_to_include } }
end

private :build_stack, :build_helpers

def execute
@block&.call(self)
end
Expand Down Expand Up @@ -419,5 +417,7 @@ def options?
options[:options_route_enabled] &&
env[Rack::REQUEST_METHOD] == Rack::OPTIONS
end

:build_stack
end
end

0 comments on commit 25c51aa

Please sign in to comment.