Class: Guignol::Shell
- Inherits:
-
Thor
- Object
- Thor
- Guignol::Shell
- Defined in:
- lib/guignol/shell.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.add_force_option ⇒ Object
29 30 31 32 33 |
# File 'lib/guignol/shell.rb', line 29 def self.add_force_option method_option :force, :aliases => %w(-f), :type => :boolean, :default => false, :desc => 'Do not ask for confirmation' end |
.exit_on_failure? ⇒ Boolean
24 25 26 |
# File 'lib/guignol/shell.rb', line 24 def self.exit_on_failure? true end |
.shared_shell ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/guignol/shell.rb', line 16 def self.shared_shell @shared_shell ||= if $stdout.tty? Thor::Shell::Color.new else Thor::Shell::Basic.new end end |
.start ⇒ Object
12 13 14 |
# File 'lib/guignol/shell.rb', line 12 def self.start super(ARGV, :shell => shared_shell) end |
Instance Method Details
#help(*args) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/guignol/shell.rb', line 5 def help(*args) shell.say shell.say "Guignol -- manipulate EC2 instances from your command line.", :cyan shell.say super end |