Sha256: e868f42d803a0236817a0131195f4c65f52c953940e3f51f5028ca067cc25f4c
Contents?: true
Size: 375 Bytes
Versions: 2
Compression:
Stored size: 375 Bytes
Contents
module MemoryModel class Collection class MarshaledRecord attr_reader :uuid, :string def initialize(record) @uuid = record._uuid_ @string = Marshal.dump record freeze end def load Marshal.load @string end def ==(other_object) uuid == other_object.try(:uuid) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
memory_model-1.0.0 | lib/memory_model/collection/marshaled_record.rb |
memory_model-0.1.0 | lib/memory_model/collection/marshaled_record.rb |