Class: Hash
Instance Method Summary collapse
Instance Method Details
#to_openstruct ⇒ Object
5 6 7 8 9 |
# File 'lib/ext/hash_to_openstruct.rb', line 5 def to_openstruct mapped = {} each{ |key,value| mapped[key] = value.to_openstruct } OpenStruct.new(mapped) end |