Module: EntityStore::SnapshotMacro

Defined in:
lib/entity_store/entity_store.rb

Instance Method Summary collapse

Instance Method Details

#snapshot_macro(cls, interval: nil) ⇒ Object Also known as: snapshot



256
257
258
259
260
261
262
263
264
# File 'lib/entity_store/entity_store.rb', line 256

def snapshot_macro(cls, interval: nil)
  define_method :snapshot_class do
    cls
  end

  define_method :snapshot_interval do
    @snapshot_interval ||= interval
  end
end