Class: SnapshotArchive::StoreBuilder::CustomStore

Inherits:
Object
  • Object
show all
Defined in:
lib/snapshot_archive/cfg.rb

Instance Method Summary collapse

Constructor Details

#initialize(backup:, restore:, delete:) ⇒ CustomStore

Returns a new instance of CustomStore.



7
8
9
10
11
# File 'lib/snapshot_archive/cfg.rb', line 7

def initialize(backup:, restore:, delete:)
  @backup = backup
  @restore = restore
  @delete = delete
end

Instance Method Details

#backupObject



13
14
15
# File 'lib/snapshot_archive/cfg.rb', line 13

def backup(...)
  @backup&.call(...)
end

#deleteObject



21
22
23
# File 'lib/snapshot_archive/cfg.rb', line 21

def delete(...)
  @delete&.call(...)
end

#restoreObject



17
18
19
# File 'lib/snapshot_archive/cfg.rb', line 17

def restore(...)
  @restore&.call(...)
end