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