Module: EntityCache::Controls::Record

Defined in:
lib/entity_cache/controls/record.rb

Defined Under Namespace

Modules: Persisted

Class Method Summary collapse

Class Method Details

.example(id = nil, version: nil, persisted_version: nil) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/entity_cache/controls/record.rb', line 4

def self.example(id=nil, version: nil, persisted_version: nil)
  id ||= ID.example
  entity = Entity.example
  version ||= Version.example
  persisted_version ||= Version::Persistent.example

  time = Time.example
  persisted_time = time

  EntityCache::Record.new(
    id,
    entity,
    version,
    time,
    persisted_version,
    persisted_time
  )
end