method
new
v6.0.0 -
Show latest stable
- Class:
ActiveSupport::HashWithIndifferentAccess
new(constructor = {})public
No documentation available.
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 67
def initialize(constructor = {})
if constructor.respond_to?(:to_hash)
super()
update(constructor)
hash = constructor.to_hash
self.default = hash.default if hash.default
self.default_proc = hash.default_proc if hash.default_proc
else
super(constructor)
end
end