Class: Place
- Inherits:
-
Object
- Object
- Place
- Defined in:
- lib/minitest/game/place.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#interaction ⇒ Object
Returns the value of attribute interaction.
-
#loot ⇒ Object
Returns the value of attribute loot.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, description) ⇒ Place
constructor
A new instance of Place.
-
#to_s ⇒ Object
public instance methods.
Constructor Details
#initialize(name, description) ⇒ Place
Returns a new instance of Place.
7 8 9 10 |
# File 'lib/minitest/game/place.rb', line 7 def initialize(name, description) @name = name @description = description end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
3 4 5 |
# File 'lib/minitest/game/place.rb', line 3 def description @description end |
#interaction ⇒ Object
Returns the value of attribute interaction.
5 6 7 |
# File 'lib/minitest/game/place.rb', line 5 def interaction @interaction end |
#loot ⇒ Object
Returns the value of attribute loot.
4 5 6 |
# File 'lib/minitest/game/place.rb', line 4 def loot @loot end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/minitest/game/place.rb', line 2 def name @name end |
Instance Method Details
#to_s ⇒ Object
public instance methods
13 14 15 |
# File 'lib/minitest/game/place.rb', line 13 def to_s puts "You arrive at " + self.name + "." end |