Class: Rack::Utils::KeySpaceConstrainedParams

Inherits:
Object
  • 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) ⇒ KeySpaceConstrainedParams

Returns a new instance of KeySpaceConstrainedParams.



30
31
32
33
34
# File 'lib/rack/indifferent.rb', line 30

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