Method: Thor::Shell::Basic#yes?
- Defined in:
- lib/thor/shell/basic.rb
#yes?(statement, color = nil) ⇒ Boolean
Make a question the to user and returns true if the user replies “y” or “yes”.
149 150 151 |
# File 'lib/thor/shell/basic.rb', line 149 def yes?(statement, color = nil) !!(ask(statement, color, add_to_history: false) =~ is?(:yes)) end |