Class: BrewCaskTools::Tasks::CLI
- Inherits:
-
Thor
- Object
- Thor
- BrewCaskTools::Tasks::CLI
- Defined in:
- lib/bct/tasks.rb
Overview
Entrypoint for CLI
Class Method Summary collapse
Instance Method Summary collapse
- #cleanup(*casks) ⇒ Object
-
#initialize(args, opts, config) ⇒ CLI
constructor
A new instance of CLI.
- #outdated ⇒ Object
- #upgrade(*casks) ⇒ Object
- #version ⇒ Object
Constructor Details
#initialize(args, opts, config) ⇒ CLI
Returns a new instance of CLI.
13 14 15 16 17 |
# File 'lib/bct/tasks.rb', line 13 def initialize(args, opts, config) super return if %w(help version).include?(config[:current_command].name) `brew update` # Update Caskroom tap so the latest formulae are pulled down end |
Class Method Details
.exit_on_failure? ⇒ Boolean
19 20 21 |
# File 'lib/bct/tasks.rb', line 19 def self.exit_on_failure? true end |
Instance Method Details
#cleanup(*casks) ⇒ Object
41 42 43 |
# File 'lib/bct/tasks.rb', line 41 def cleanup(*casks) Tasks::Cleanup.new(casks) end |
#upgrade(*casks) ⇒ Object
35 36 37 |
# File 'lib/bct/tasks.rb', line 35 def upgrade(*casks) Tasks::Upgrade.new(casks) end |
#version ⇒ Object
24 25 26 |
# File 'lib/bct/tasks.rb', line 24 def version say BrewCaskTools::VERSION, :green end |