module Gemmy::Patches::HashPatch::InstanceMethods::ToOpenStruct
Public Instance Methods
recursive_to_ostruct(exclude={})
click to toggle source
# File lib/gemmy/patches/hash_patch.rb, line 61 def recursive_to_ostruct(exclude={}) return exclude[self] if exclude.key?( self ) o = exclude[self] = OpenStruct.new h = self.dup each_pair do |k,v| h[k] = v.to_ostruct_recurse( exclude ) if v.respond_to?(:to_ostruct_recurse) end o.merge!(h) end
to_ostruct()
click to toggle source
facets
# File lib/gemmy/patches/hash_patch.rb, line 58 def to_ostruct OpenStruct.new(self) end