Class: Backups::Cli
- Inherits:
-
Thor
- Object
- Thor
- Backups::Cli
- Defined in:
- lib/backups/cli.rb
Instance Method Summary collapse
- #crontab ⇒ Object
- #install ⇒ Object
- #ls ⇒ Object
- #show(job = nil) ⇒ Object
- #start(job = nil) ⇒ Object
- #verify(job = nil) ⇒ Object
- #version ⇒ Object
Instance Method Details
#crontab ⇒ Object
46 47 48 |
# File 'lib/backups/cli.rb', line 46 def crontab puts Crontab.new.show() 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 |
#version ⇒ Object
7 8 9 |
# File 'lib/backups/cli.rb', line 7 def version puts "v#{VERSION}" end |