Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/highline/import.rb
Instance Method Summary collapse
-
#or_ask(*args, &details) ⇒ Object
Tries this object as a first_answer for a HighLine::Question.
Instance Method Details
#or_ask(*args, &details) ⇒ Object
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.
36 37 38 39 40 41 42 |
# File 'lib/highline/import.rb', line 36 def or_ask( *args, &details ) ask(*args) do |question| question.first_answer = String(self) unless nil? details.call(question) unless details.nil? end end |