Class: SnapshotArchive::Stores::BoundBackup

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(store, args) ⇒ BoundBackup

Returns a new instance of BoundBackup.

Raises:

  • (ArgumentError)


5
6
7
8
9
10
# File 'lib/snapshot_archive/stores.rb', line 5

def initialize(store, args)
  raise ArgumentError.new("double bound backup") if store.is_a?(BoundBackup)

  @store = store
  @args = args
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



4
5
6
# File 'lib/snapshot_archive/stores.rb', line 4

def args
  @args
end

#storeObject (readonly)

Returns the value of attribute store.



4
5
6
# File 'lib/snapshot_archive/stores.rb', line 4

def store
  @store
end

Instance Method Details

#backup(**opts) ⇒ Object



12
13
14
# File 'lib/snapshot_archive/stores.rb', line 12

def backup(**opts)
  store.backup(args: args, **opts)
end

#deleteObject



20
21
22
# File 'lib/snapshot_archive/stores.rb', line 20

def delete(...)
  store.delete(...)
end

#restoreObject



16
17
18
# File 'lib/snapshot_archive/stores.rb', line 16

def restore(...)
  store.restore(...)
end