Sha256: e26cf0adf343d2fc96949bf665a02a84360abcd3bd45b8a18667f4aa9b19ddbc
Contents?: true
Size: 596 Bytes
Versions: 11
Compression:
Stored size: 596 Bytes
Contents
module RecursiveOpenStruct::Ruby19Backport # Apply fix if necessary: # https://github.com/ruby/ruby/commit/2d952c6d16ffe06a28bb1007e2cd1410c3db2d58 def initialize_copy(orig) super @table.each_key{|key| new_ostruct_member(key)} end def []=(name, value) modifiable[new_ostruct_member(name)] = value end def eql?(other) return false unless other.kind_of?(OpenStruct) @table.eql?(other.table) end def hash @table.hash end def each_pair return to_enum(:each_pair) { @table.size } unless block_given? @table.each_pair{|p| yield p} end end
Version data entries
11 entries across 11 versions & 2 rubygems