Class: Hash

Inherits:
Object
  • Object
show all
Includes:
Hashable
Defined in:
lib/hashable/hash.rb

Constant Summary

Constants included from Hashable

Hashable::VERSION

Instance Method Summary collapse

Instance Method Details

#to_deep_hashObject Also known as: to_dh

Return recursively hash representation of the given hash

Returns:

  • 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