Class: DiskRecord
- Inherits:
-
Object
- Object
- DiskRecord
- Defined in:
- service/records/disk_records.rb
Overview
Disk Record Model class
Direct Known Subclasses
Defined Under Namespace
Classes: CreateDiskRecord, DeleteDiskRecord
Instance Method Summary collapse
-
#sortable ⇒ Object
Splits itself into Create- and Delete-(if snap has been deleted) DiskRecord.
-
#type_sym ⇒ Object
State hash key generator, e.g.
-
#values ⇒ Object
Record values withoud DB key.
Instance Method Details
#sortable ⇒ Object
Splits itself into Create- and Delete-(if snap has been deleted) DiskRecord
60 61 62 63 64 65 66 |
# File 'service/records/disk_records.rb', line 60 def sortable if self.del then [CreateDiskRecord.new(values), DeleteDiskRecord.new(values)] else CreateDiskRecord.new(values) end end |
#type_sym ⇒ Object
State hash key generator, e.g. backup disk would be :backup_disk
19 20 21 |
# File 'service/records/disk_records.rb', line 19 def type_sym "#{type}_disk".to_sym end |
#values ⇒ Object
Record values withoud DB key
55 56 57 |
# File 'service/records/disk_records.rb', line 55 def values @values.without(:key) end |