Class: Northshire_inn

Inherits:
Object
  • Object
show all
Includes:
Inn
Defined in:
lib/northshire.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Inn

#rest

Constructor Details

#initialize(name = 'Northshire Inn', commands = ['leave', 'look', 'rest']) ⇒ Northshire_inn

Returns a new instance of Northshire_inn.



44
45
46
47
# File 'lib/northshire.rb', line 44

def initialize(name = 'Northshire Inn', commands = ['leave', 'look', 'rest'])
	@name = name
	@commands = commands
end

Instance Attribute Details

#commandsObject

Returns the value of attribute commands.



40
41
42
# File 'lib/northshire.rb', line 40

def commands
  @commands
end

#nameObject

Returns the value of attribute name.



40
41
42
# File 'lib/northshire.rb', line 40

def name
  @name
end

Instance Method Details

#introductionObject



53
54
55
56
57
# File 'lib/northshire.rb', line 53

def introduction
	puts 'You walk into the inn. The interior is just as bleak as the rest of the town.'
	puts "You see the innkeeper - a sad looking man - who asks if you would like a room."
	puts "(rest)"
end

#leaveObject



49
50
51
# File 'lib/northshire.rb', line 49

def leave
	$player.position.delete_at (0)
end

#lookObject



59
60
61
62
# File 'lib/northshire.rb', line 59

def look
	puts 'You see the innkeeper behind a wooden counter. Their is little light here, but'
	puts 'enough to see that the walls are bare. There is nothing of any interest here.'
end