Class: SnapshotArchive::Cli

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

Class Method Summary collapse

Class Method Details

.backup(msg:, stores:) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/snapshot_archive/cli.rb', line 13

def backup(msg:, stores:)
  if msg.empty?
    Cfg.shell.warn("aborting due to empty message")
  else
    Cfg.repository.add(msg: msg, stores: stores)
  end
end

.delete(id) ⇒ Object



33
34
35
# File 'lib/snapshot_archive/cli.rb', line 33

def delete(id)
  Cfg.repository.delete(id)
end

.listObject



25
26
27
# File 'lib/snapshot_archive/cli.rb', line 25

def list(...)
  Cfg.repository.list(...)
end

.restore(id:) ⇒ Object



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

def restore(id:)
  Cfg.repository.restore(id)
end

.show(id) ⇒ Object



29
30
31
# File 'lib/snapshot_archive/cli.rb', line 29

def show(id)
  Cfg.repository.show(id)
end