Class: BooticCli::Command

Inherits:
Thor
  • Object
show all
Includes:
Connectivity, Thor::Actions
Defined in:
lib/bootic_cli/command.rb

Constant Summary

Constants included from Connectivity

BooticCli::Connectivity::DEFAULT_ENV

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.declare(klass, descr) ⇒ Object



17
18
19
# File 'lib/bootic_cli/command.rb', line 17

def self.declare(klass, descr)
  BooticCli::CLI.sub klass, descr
end

Instance Method Details

#help(some, arg) ⇒ Object

override Thor’s help method to print banner and check for keys



10
11
12
13
14
15
# File 'lib/bootic_cli/command.rb', line 10

def help(some, arg)
  say "Bootic CLI v#{BooticCli::VERSION}\n\n", :bold
  super

  examples if respond_to?(:examples)
end