Class: SimpleChoice
- Inherits:
-
QuestionFather
- Object
- QuestionFather
- SimpleChoice
- Defined in:
- lib/question/simpleChoice/base.rb
Instance Attribute Summary (collapse)
-
- (Object) distractor
Returns the value of attribute distractor.
-
- (Object) right
Returns the value of attribute right.
-
- (Object) text
Returns the value of attribute text.
Attributes inherited from QuestionFather
Instance Method Summary (collapse)
-
- (SimpleChoice) initialize(args)
constructor
A new instance of SimpleChoice.
- - (Object) to_s
Methods inherited from QuestionFather
Constructor Details
- (SimpleChoice) initialize(args)
Returns a new instance of SimpleChoice
5 6 7 |
# File 'lib/question/simpleChoice/base.rb', line 5 def initialize(args) super end |
Instance Attribute Details
- (Object) distractor
Returns the value of attribute distractor
4 5 6 |
# File 'lib/question/simpleChoice/base.rb', line 4 def distractor @distractor end |
- (Object) right
Returns the value of attribute right
4 5 6 |
# File 'lib/question/simpleChoice/base.rb', line 4 def right @right end |
- (Object) text
Returns the value of attribute text
4 5 6 |
# File 'lib/question/simpleChoice/base.rb', line 4 def text @text end |
Instance Method Details
- (Object) to_s
9 10 11 12 13 14 |
# File 'lib/question/simpleChoice/base.rb', line 9 def to_s = @distractor + [@right] = .shuffle puts "- Elige la pregunta correcta de la siguiente pregunta #{@text} ?" .each {|o|} end |