Skip to content

Commit

Permalink
Do not #to_h redirector options
Browse files Browse the repository at this point in the history
  • Loading branch information
ixti committed Mar 30, 2015
1 parent 5dc27c4 commit e2ecf81
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/http/redirector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,10 @@ class EndlessRedirectError < TooManyRedirectsError; end
# @return [Fixnum]
attr_reader :max_hops

# @param [#to_h] opts
# @param [Hash] opts
# @option opts [Boolean] :strict (true) redirector hops policy
# @option opts [#to_i] :max_hops (5) maximum allowed amount of hops
def initialize(options = {})
options = options.to_h

@strict = options.fetch(:strict, true)
@max_hops = options.fetch(:max_hops, 5).to_i
end
Expand Down

0 comments on commit e2ecf81

Please sign in to comment.