Class: MultipleChoice
Direct Known Subclasses
Instance Attribute Summary collapse
-
#multiple ⇒ Object
Returns the value of attribute multiple.
Attributes inherited from Question
#answers, #name, #points, #question_comment, #question_tags, #question_text, #randomize, #raw
Instance Method Summary collapse
-
#initialize(text = '', opts = {}) ⇒ MultipleChoice
constructor
A new instance of MultipleChoice.
Methods inherited from Question
#answer, #answer_helper, #comment, #correct_answer, #correct_answers, #distractor, #explanation, from_JSON, #raw?, #tags, #text, #to_JSON
Constructor Details
#initialize(text = '', opts = {}) ⇒ MultipleChoice
Returns a new instance of MultipleChoice.
4 5 6 7 8 9 |
# File 'lib/ruql/multiple_choice.rb', line 4 def initialize(text='', opts={}) super self.question_text = text self.multiple = !!opts[:multiple] self.randomize = !!opts[:randomize] end |
Instance Attribute Details
#multiple ⇒ Object
Returns the value of attribute multiple.
2 3 4 |
# File 'lib/ruql/multiple_choice.rb', line 2 def multiple @multiple end |