Class: Cartage::Manifest::InstallDefaultIgnoreCommand
- Inherits:
-
Command
- Object
- CmdParse::Command
- Command
- Cartage::Manifest::InstallDefaultIgnoreCommand
- Defined in:
- lib/cartage/manifest/commands.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#initialize(cartage) ⇒ InstallDefaultIgnoreCommand
constructor
A new instance of InstallDefaultIgnoreCommand.
- #perform ⇒ Object
Methods inherited from Command
Constructor Details
#initialize(cartage) ⇒ InstallDefaultIgnoreCommand
Returns a new instance of InstallDefaultIgnoreCommand.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/cartage/manifest/commands.rb', line 54 def initialize(cartage) super(cartage, 'install-ignore') takes_commands(false) short_desc('Installs the default ignore file.') self. do |opts| opts.on('-f', '--force', 'Force write .cartignore.') { @mode = :force } opts.on('-m', '--merge', 'Merge .cartignore with the default.') { @mode = :merge } end @manifest = cartage.manifest @mode = nil end |
Instance Method Details
#perform ⇒ Object
72 73 74 |
# File 'lib/cartage/manifest/commands.rb', line 72 def perform(*) @manifest.install_default_ignore(mode: @mode) end |