Class: Hash::Nested

Inherits:
Hash
  • Object
show all
Includes:
DeepFreezable
Defined in:
lib/hash_ext/nested.rb

Instance Method Summary collapse

Methods included from DeepFreezable

#deep_freeze

Instance Method Details

#[](key) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/hash_ext/nested.rb', line 6

def [](key)
  if key? key 
    super(key)
  else
    self[key] = Nested.new
  end
end