Method: Hash#to_open_struct
- Defined in:
- lib/core_ext/hash.rb
#to_open_struct ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/core_ext/hash.rb', line 4 def to_open_struct out = OpenStruct.new self out.each_pair do |k, v| out[k] = v.to_open_struct end out end |