Class: Cir::Cli::RestoreCommand
- Inherits:
-
CommandWithRepository
- Object
- Command
- CommandWithRepository
- Cir::Cli::RestoreCommand
- Defined in:
- lib/cir/cli/restore_command.rb
Overview
Restore command
Instance Attribute Summary
Attributes inherited from CommandWithRepository
Attributes inherited from Command
Instance Method Summary collapse
Methods inherited from CommandWithRepository
Methods inherited from Command
Constructor Details
This class inherits a constructor from Cir::Cli::CommandWithRepository
Instance Method Details
#opts ⇒ Object
20 21 22 23 24 |
# File 'lib/cir/cli/restore_command.rb', line 20 def opts Trollop::Parser.new do "Discard local changes and restore last known version of the file (~ git reset)" end end |
#process ⇒ Object
26 27 28 29 30 |
# File 'lib/cir/cli/restore_command.rb', line 26 def process Trollop::die "Missing file list" if self.files.empty? self.repository.restore(self.files) end |