class Hash

Monkey-patching Hash

Public Instance Methods

to_open_struct() click to toggle source
# 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