Sha256: 9092fca3b0238eff1b193e949bd878883655e6ca419cea79212e7a62fe4ddcab
Contents?: true
Size: 670 Bytes
Versions: 48
Compression:
Stored size: 670 Bytes
Contents
require 'ostruct' module Spider class Scene < OpenStruct def []=(key, val) self.send("#{key}=", val) end def [](key) #self.send(key) @table[key] end def to_json @table.to_json end def to_hash @table end def <<(other) if other.is_a?(Hash) @table.merge!(other) end end def merge!(other) @table.merge!(other.instance_variable_get("@table")) self end end end
Version data entries
48 entries across 48 versions & 1 rubygems