Class: Answer
- Inherits:
-
Object
- Object
- Answer
- Defined in:
- lib/quizm.rb
Instance Attribute Summary collapse
-
#correct ⇒ Object
readonly
Returns the value of attribute correct.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text, correct) ⇒ Answer
constructor
A new instance of Answer.
Constructor Details
#initialize(text, correct) ⇒ Answer
Returns a new instance of Answer.
26 27 28 29 |
# File 'lib/quizm.rb', line 26 def initialize( text, correct ) @text = text @correct = correct end |
Instance Attribute Details
#correct ⇒ Object (readonly)
Returns the value of attribute correct.
25 26 27 |
# File 'lib/quizm.rb', line 25 def correct @correct end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
25 26 27 |
# File 'lib/quizm.rb', line 25 def text @text end |