Class: Hash
Constant Summary
Constants included from Hashable
Instance Method Summary collapse
-
#to_deep_hash ⇒ Object
(also: #to_dh)
Return recursively hash representation of the given hash.
Instance Method Details
#to_deep_hash ⇒ Object Also known as: to_dh
Return recursively hash representation of the given hash
9 10 11 12 13 14 15 |
# File 'lib/hashable/hash.rb', line 9 def to_deep_hash hash = {} self.keys.each do |key| hash[key] = deeply_to_hash(self[key]) end hash end |