Module: EntityStore::Controls::Entity::Cached
- Defined in:
- lib/entity_store/controls/entity.rb
Class Method Summary collapse
Class Method Details
.add(id, store) ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/entity_store/controls/entity.rb', line 29 def self.add(id, store) entity = self.example version = Version::Cached.example store.cache.add(id, entity, version, persisted_version: version) return entity, version end |
.example ⇒ Object
25 26 27 |
# File 'lib/entity_store/controls/entity.rb', line 25 def self.example Example.build :sum => sum end |
.sum ⇒ Object
38 39 40 |
# File 'lib/entity_store/controls/entity.rb', line 38 def self.sum 1 end |