Class: Backups::Cli

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

Instance Method Summary collapse

Instance Method Details

#crontabObject



46
47
48
# File 'lib/backups/cli.rb', line 46

def crontab
  puts Crontab.new.show()
end

#installObject



41
42
43
# File 'lib/backups/cli.rb', line 41

def install
  Crontab.new.install
end

#lsObject



12
13
14
# File 'lib/backups/cli.rb', line 12

def ls
  Crontab.new.list()
end

#show(job = nil) ⇒ Object



17
18
19
20
# File 'lib/backups/cli.rb', line 17

def show job = nil
  data = Runner.new.show(job)
  puts data.to_json
end

#start(job = nil) ⇒ Object



23
24
25
26
27
28
29
# File 'lib/backups/cli.rb', line 23

def start job = nil
  if job
    Runner.new.start job
  else
    Runner.new.start_all
  end
end

#verify(job = nil) ⇒ Object



32
33
34
35
36
37
38
# File 'lib/backups/cli.rb', line 32

def verify job = nil
  if job
    Runner.new.verify job
  else
    Runner.new.verify_all
  end
end

#versionObject



7
8
9
# File 'lib/backups/cli.rb', line 7

def version
  puts "v#{VERSION}"
end