Class: Hotel

Inherits:
Object
  • Object
show all
Defined in:
lib/travel/hotels.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, location) ⇒ Hotel

Returns a new instance of Hotel.



4
5
6
7
# File 'lib/travel/hotels.rb', line 4

def initialize(name, location)
  @name = name 
  @location = location
end

Instance Attribute Details

#locationObject

Returns the value of attribute location.



2
3
4
# File 'lib/travel/hotels.rb', line 2

def location
  @location
end

#nameObject

Returns the value of attribute name.



2
3
4
# File 'lib/travel/hotels.rb', line 2

def name
  @name
end