Class: Casino::Question
- Inherits:
-
Object
- Object
- Casino::Question
- Defined in:
- lib/casino/question.rb
Instance Attribute Summary collapse
-
#answer ⇒ Object
Returns the value of attribute answer.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, answer) ⇒ Question
constructor
A new instance of Question.
Constructor Details
#initialize(name, answer) ⇒ Question
Returns a new instance of Question.
4 5 6 7 |
# File 'lib/casino/question.rb', line 4 def initialize(name, answer) self.name = name self.answer = answer end |
Instance Attribute Details
#answer ⇒ Object
Returns the value of attribute answer.
3 4 5 |
# File 'lib/casino/question.rb', line 3 def answer @answer end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/casino/question.rb', line 3 def name @name end |