Class: Place

Inherits:
Object
  • Object
show all
Defined in:
lib/minitest/game/place.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#descriptionObject

Returns the value of attribute description.



3
4
5
# File 'lib/minitest/game/place.rb', line 3

def description
  @description
end

#interactionObject

Returns the value of attribute interaction.



5
6
7
# File 'lib/minitest/game/place.rb', line 5

def interaction
  @interaction
end

#lootObject

Returns the value of attribute loot.



4
5
6
# File 'lib/minitest/game/place.rb', line 4

def loot
  @loot
end

#nameObject

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_sObject

public instance methods



13
14
15
# File 'lib/minitest/game/place.rb', line 13

def to_s
  puts "You arrive at " + self.name + "."
end