Sha256: 1881ded7ac4bb36b54c6a98c52bcafa6fbb159df70c6ec1cae042d06213db1d2
Contents?: true
Size: 601 Bytes
Versions: 74
Compression:
Stored size: 601 Bytes
Contents
class OpenStruct def [](name) @table[name.to_sym] end unless method_defined? :[] def []=(name, value) modifiable[new_ostruct_member(name)] = value end unless method_defined? :[]= def eql?(other) return false unless other.kind_of?(OpenStruct) @table.eql?(other.table) end unless method_defined? :eql? def hash @table.hash end unless method_defined? :hash def each_pair return to_enum(:each_pair) unless block_given? @table.each_pair{|p| yield p} end unless method_defined? :each_pair def to_h @table.dup end unless method_defined? :to_h end
Version data entries
74 entries across 74 versions & 5 rubygems