Method: Object#or_ask
- Defined in:
- lib/highline/import.rb
#or_ask(*args, &details) ⇒ String
Tries this object as a first_answer for a HighLine::Question. See that attribute for details.
Warning: This Object will be passed to String() before set.
41 42 43 44 45 46 47 |
# File 'lib/highline/import.rb', line 41 def or_ask(*args, &details) ask(*args) do |question| question.first_answer = String(self) yield(question) if details end end |