Class: QnAMaker::Answer
- Inherits:
-
Object
- Object
- QnAMaker::Answer
- Defined in:
- lib/qna_maker/answer.rb
Overview
Answer class
Instance Attribute Summary collapse
-
#answer ⇒ Object
readonly
Returns the value of attribute answer.
-
#questions ⇒ Object
readonly
Returns the value of attribute questions.
-
#score ⇒ Object
readonly
Returns the value of attribute score.
Instance Method Summary collapse
-
#initialize(answer, questions, score) ⇒ Answer
constructor
Creates an object for storing data about answer.
Constructor Details
#initialize(answer, questions, score) ⇒ Answer
Creates an object for storing data about answer.
15 16 17 18 19 |
# File 'lib/qna_maker/answer.rb', line 15 def initialize(answer, questions, score) @answer = answer @questions = questions @score = score end |
Instance Attribute Details
#answer ⇒ Object (readonly)
Returns the value of attribute answer.
6 7 8 |
# File 'lib/qna_maker/answer.rb', line 6 def answer @answer end |
#questions ⇒ Object (readonly)
Returns the value of attribute questions.
6 7 8 |
# File 'lib/qna_maker/answer.rb', line 6 def questions @questions end |
#score ⇒ Object (readonly)
Returns the value of attribute score.
6 7 8 |
# File 'lib/qna_maker/answer.rb', line 6 def score @score end |