Sha256: 74034d22187928949c1f3629b088819630866e1ac6813592229b8756a772123e
Contents?: true
Size: 243 Bytes
Versions: 2
Compression:
Stored size: 243 Bytes
Contents
module MemoryModel class Base module Persistence def persisted? !!self.class.find_by(_uuid_: self._uuid_) end alias :exists? :persisted? def new_record? !persisted? end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
memory_model-1.0.0 | lib/memory_model/base/persistence.rb |
memory_model-0.1.0 | lib/memory_model/base/persistence.rb |