Class: Thor::Shell::Basic

Inherits:
Object
  • Object
show all
Defined in:
lib/mb/thor_ext.rb

Direct Known Subclasses

MotherBrain::Cli::Shell::Basic

Instance Method Summary collapse

Instance Method Details

#ask(statement, *args) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/mb/thor_ext.rb', line 6

def ask(statement, *args)
  options = args.last.is_a?(Hash) ? args.pop : {}
  color = args.first

  if options[:limited_to]
    ask_filtered(statement, color, options)
  else
    ask_simply(statement, color, options)
  end
end