# File lib/facets/core/hash/to_ostruct_recurse.rb, line 26 def to_ostruct_recurse( 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.__update__( h ) end