Class: Struct

Inherits:
Object show all
Defined in:
lib/lh/core_extensions/struct/to_hash.rb

Instance Method Summary collapse

Instance Method Details

#to_hashObject



4
5
6
7
8
9
10
# File 'lib/lh/core_extensions/struct/to_hash.rb', line 4

def to_hash
  hash = {}
  self.each_pair do |key, value|
    hash[key] = value
  end
  hash
end