Class: BottomlessHash
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ BottomlessHash
constructor
A new instance of BottomlessHash.
Methods inherited from Hash
#apply_diff, #apply_diff!, #bottomless, #diff, #except, #grep, #only, #pop, #recursively_symbolize_keys!, #symbolize_keys, #symbolize_keys!, #to_query_string
Constructor Details
#initialize ⇒ BottomlessHash
Returns a new instance of BottomlessHash.
2 3 4 |
# File 'lib/midwire_common/hash.rb', line 2 def initialize super &-> h, k { h[k] = self.class.new } end |
Class Method Details
.from_hash(hash) ⇒ Object
6 7 8 |
# File 'lib/midwire_common/hash.rb', line 6 def self.from_hash(hash) new.merge(hash) end |