Class: Cir::Cli::RegisterCommand
- Inherits:
-
CommandWithRepository
- Object
- Command
- CommandWithRepository
- Cir::Cli::RegisterCommand
- Defined in:
- lib/cir/cli/register_command.rb
Overview
Register 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 25 |
# File 'lib/cir/cli/register_command.rb', line 20 def opts Trollop::Parser.new do "Start tracking new file(s)." opt :message, "Optional commit message that should be used when updating the changes in tracking git repository.", type: :string end end |
#process ⇒ Object
27 28 29 30 31 |
# File 'lib/cir/cli/register_command.rb', line 27 def process Trollop::die "Missing file list" if self.files.empty? self.repository.register(self.files, {message: self.args.}) end |