Class: QuestionFather
- Inherits:
-
Object
- Object
- QuestionFather
- Includes:
- Comparable
- Defined in:
- lib/question/questionFather/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#dif ⇒ Object
Returns the value of attribute dif.
-
#distractor ⇒ Object
Returns the value of attribute distractor.
-
#right ⇒ Object
Returns the value of attribute right.
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(args) ⇒ QuestionFather
constructor
A new instance of QuestionFather.
Constructor Details
#initialize(args) ⇒ QuestionFather
Returns a new instance of QuestionFather.
6 7 8 9 10 11 |
# File 'lib/question/questionFather/base.rb', line 6 def initialize(args) @text = args[:text] @right = args[:right] @distractor = args[:distractor] @dif = args[:dif] end |
Instance Attribute Details
#dif ⇒ Object
Returns the value of attribute dif.
4 5 6 |
# File 'lib/question/questionFather/base.rb', line 4 def dif @dif end |
#distractor ⇒ Object
Returns the value of attribute distractor.
4 5 6 |
# File 'lib/question/questionFather/base.rb', line 4 def distractor @distractor end |
#right ⇒ Object
Returns the value of attribute right.
4 5 6 |
# File 'lib/question/questionFather/base.rb', line 4 def right @right end |
#text ⇒ Object
Returns the value of attribute text.
4 5 6 |
# File 'lib/question/questionFather/base.rb', line 4 def text @text end |
Instance Method Details
#<=>(other) ⇒ Object
12 13 14 |
# File 'lib/question/questionFather/base.rb', line 12 def <=>(other) self.dif <=> other.dif end |