Class: Snapshooter::CLI
- Inherits:
-
Object
- Object
- Snapshooter::CLI
- Defined in:
- lib/snapshooter/cli.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ CLI
constructor
A new instance of CLI.
- #run ⇒ Object
Constructor Details
#initialize ⇒ CLI
Returns a new instance of CLI.
9 10 11 12 13 14 15 16 |
# File 'lib/snapshooter/cli.rb', line 9 def initialize = { :storage => :local, :id => Time.now.to_i, :restore => false } .merge! end |
Class Method Details
.start ⇒ Object
5 6 7 |
# File 'lib/snapshooter/cli.rb', line 5 def self.start new.run end |
Instance Method Details
#run ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/snapshooter/cli.rb', line 18 def run shooter = Base.new([:id], [:storage]) if [:restore] shooter.restore else shooter.snapshot! end end |