Class: SunQuiz::Question
- Inherits:
-
Object
- Object
- SunQuiz::Question
- Defined in:
- lib/sun_quiz.rb
Instance Attribute Summary collapse
-
#answer ⇒ Object
Returns the value of attribute answer.
-
#prompt ⇒ Object
Returns the value of attribute prompt.
Instance Method Summary collapse
-
#initialize(prompt, answer) ⇒ Question
constructor
A new instance of Question.
Constructor Details
#initialize(prompt, answer) ⇒ Question
Returns a new instance of Question.
6 7 8 9 |
# File 'lib/sun_quiz.rb', line 6 def initialize prompt, answer @prompt = prompt @answer = answer end |
Instance Attribute Details
#answer ⇒ Object
Returns the value of attribute answer.
5 6 7 |
# File 'lib/sun_quiz.rb', line 5 def answer @answer end |
#prompt ⇒ Object
Returns the value of attribute prompt.
5 6 7 |
# File 'lib/sun_quiz.rb', line 5 def prompt @prompt end |