Method: Questions::Answers#<<
- Defined in:
 - lib/questions/answers.rb
 
#<<(arg) ⇒ Answers
Adds answer. Answer can be an instance of Questions::Answer, Symbol, a Hash or an Array. Chaining is supported.
      75 76 77 78 79 80 81 82 83 84 85  | 
    
      # File 'lib/questions/answers.rb', line 75 def <<(arg) case arg when Answer then super arg when Symbol then super Answer.new(arg) when Array arg.each { |arg| self << arg } # call as Answer or Symbol when Hash self << AnswersHelper.convert_hash_to_answers(AnswersHelper.select_symbols(arg)) # call as Array end self end  |