Module: Struct::ToHash::RubyOld

Included in:
Struct::ToHash
Defined in:
lib/win32_service_manager/core_ext/struct_to_hash.rb

Instance Method Summary collapse

Instance Method Details

#to_hashObject



11
12
13
14
15
16
# File 'lib/win32_service_manager/core_ext/struct_to_hash.rb', line 11

def to_hash
  hashable!
  vals = []
  each_pair{|k,v| vals << k; vals << v}
  Hash[*vals]
end