Module: Toy::Extensions::Hash

Included in:
Hash
Defined in:
lib/toy/extensions/hash.rb

Instance Method Summary collapse

Instance Method Details

#from_store(value) ⇒ Object



8
9
10
# File 'lib/toy/extensions/hash.rb', line 8

def from_store(value, *)
  value.nil? ? store_default : value
end

#store_defaultObject



4
5
6
# File 'lib/toy/extensions/hash.rb', line 4

def store_default
  {}
end