Class: Isurvey::Question
- Inherits:
-
Object
- Object
- Isurvey::Question
- Extended by:
- Collector
- Includes:
- Base
- Defined in:
- lib/isurvey/question.rb
Instance Attribute Summary
Attributes included from Base
Instance Method Summary collapse
Methods included from Collector
[], all, first, method_missing
Methods included from Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Isurvey::Base
Instance Method Details
#answers ⇒ Object
6 7 8 |
# File 'lib/isurvey/question.rb', line 6 def answers Answer.find_by_screen_id(self.screen_id) end |
#answers_by_result_id(id) ⇒ Object
10 11 12 13 14 |
# File 'lib/isurvey/question.rb', line 10 def answers_by_result_id(id) answers.select do |answer| answer.result_id == id end end |