Method: HighLine::Question.build
- Defined in:
- lib/highline/question.rb
.build(template_or_question, answer_type = nil, &details) ⇒ Question
If template_or_question is already a Question object just return it. If not, build it.
35 36 37 38 39 40 41 |
# File 'lib/highline/question.rb', line 35 def self.build(template_or_question, answer_type = nil, &details) if template_or_question.is_a? Question template_or_question else Question.new(template_or_question, answer_type, &details) end end |