Class: SnapshotRecord

Inherits:
Object
  • Object
show all
Defined in:
service/records/records.rb

Overview

Snapshot Record Model class

Direct Known Subclasses

CreateSnapshotRecord, DeleteSnapshotRecord

Defined Under Namespace

Classes: CreateSnapshotRecord, DeleteSnapshotRecord

Instance Method Summary collapse

Instance Method Details

#sortableObject

Splits itself into Create- and Delete-(if snap has been deleted) SnapshotRecord



80
81
82
83
84
85
86
# File 'service/records/records.rb', line 80

def sortable
  if self.del then
    [CreateSnapshotRecord.new(values), DeleteSnapshotRecord.new(values)]
  else
    CreateSnapshotRecord.new(values)
  end
end

#valuesObject

Record values withoud DB key



75
76
77
# File 'service/records/records.rb', line 75

def values
  @values.without(:key)
end