Class: AttributeStruct::AttributeHash

Inherits:
Hash
  • Object
show all
Includes:
Hashie::Extensions::DeepMerge, Hashie::Extensions::IndifferentAccess
Defined in:
lib/attribute_struct/attribute_hash.rb

Instance Method Summary collapse

Instance Method Details

#to_hashObject



9
10
11
12
13
14
15
# File 'lib/attribute_struct/attribute_hash.rb', line 9

def to_hash
  ::Hash[
    self.map do |k,v|
      [k, v.is_a?(::Hash) ? v.to_hash : v]
    end
  ]
end