Class: StudioGame::Treasure
- Inherits:
-
Struct
- Object
- Struct
- StudioGame::Treasure
- Defined in:
- lib/studio_game/treasure_trove.rb,
lib/studio_game/treasure_trove.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#points ⇒ Object
Returns the value of attribute points.
Instance Method Summary collapse
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
2 3 4 |
# File 'lib/studio_game/treasure_trove.rb', line 2 def name @name end |
#points ⇒ Object
Returns the value of attribute points
2 3 4 |
# File 'lib/studio_game/treasure_trove.rb', line 2 def points @points end |
Instance Method Details
#to_s ⇒ Object
4 5 6 |
# File 'lib/studio_game/treasure_trove.rb', line 4 def to_s "treasure #{name} worth #{points} points" end |