class MoreOpenStruct
Public Instance Methods
_manual_set(hash)
click to toggle source
# File lib/helpers/hash_helpers.rb, line 66 def _manual_set(hash) if hash && (hash.class == Hash) for k,v in hash @table[k.to_sym] = v new_ostruct_member(k) end end end
_table()
click to toggle source
# File lib/helpers/hash_helpers.rb, line 62 def _table @table #table is the hash structure used in OpenStruct end
_to_hash()
click to toggle source
# File lib/helpers/hash_helpers.rb, line 51 def _to_hash h = @table #handles nested structures h.each do |k,v| if v.class == MoreOpenStruct h[k] = v._to_hash end end return h end