Class: Thor::Shell::Basic
- Inherits:
-
Object
- Object
- Thor::Shell::Basic
- Defined in:
- lib/thor/shell/basic.rb
Instance Method Summary collapse
Instance Method Details
#ask(statement, *args) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/thor/shell/basic.rb', line 7 def ask(statement, *args) = args.last.is_a?(Hash) ? args.pop : {} color = args.pop default = [:default] if [:limited_to] ask_filtered(statement, [:limited_to], color, default) else ask_simply(statement, color, default) end end |
#yes?(statement, *args) ⇒ Boolean
18 19 20 |
# File 'lib/thor/shell/basic.rb', line 18 def yes?(statement, *args) !!(ask(statement, *args) =~ is?(:yes)) end |