Class: Rack::Indifferent::QueryParser::Params

Inherits:
QueryParser::Params
  • Object
show all
Defined in:
lib/rack/indifferent.rb

Constant Summary collapse

INDIFFERENT_PROC =
lambda{|h,k| h[k.to_s] if k.is_a?(Symbol)}

Instance Method Summary collapse

Constructor Details

#initialize(limit = Rack::Utils.key_space_limit) ⇒ Params

Returns a new instance of Params.



16
17
18
19
20
# File 'lib/rack/indifferent.rb', line 16

def initialize(limit = Rack::Utils.key_space_limit)
  @limit  = limit
  @size   = 0
  @params = Hash.new(&INDIFFERENT_PROC)
end