Class: SnapshotArchive::Stores::BoundBackup
- Inherits:
-
Object
- Object
- SnapshotArchive::Stores::BoundBackup
- Defined in:
- lib/snapshot_archive/stores.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#store ⇒ Object
readonly
Returns the value of attribute store.
Instance Method Summary collapse
- #backup(**opts) ⇒ Object
- #delete ⇒ Object
-
#initialize(store, args) ⇒ BoundBackup
constructor
A new instance of BoundBackup.
- #restore ⇒ Object
Constructor Details
#initialize(store, args) ⇒ BoundBackup
Returns a new instance of BoundBackup.
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
#args ⇒ Object (readonly)
Returns the value of attribute args.
4 5 6 |
# File 'lib/snapshot_archive/stores.rb', line 4 def args @args end |
#store ⇒ Object (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 |
#delete ⇒ Object
20 21 22 |
# File 'lib/snapshot_archive/stores.rb', line 20 def delete(...) store.delete(...) end |
#restore ⇒ Object
16 17 18 |
# File 'lib/snapshot_archive/stores.rb', line 16 def restore(...) store.restore(...) end |