Class: Restaurant

Inherits:
Object
  • Object
show all
Defined in:
lib/DinnerChoice/models/Restaurants.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, address, rating, average_price) ⇒ Restaurant

Returns a new instance of Restaurant.



3
4
5
6
7
8
# File 'lib/DinnerChoice/models/Restaurants.rb', line 3

def initialize( name, address, rating, average_price)
  @name = name
  @address = address
  @rating = rating
  @average_price = average_price
end

Instance Attribute Details

#addressObject

Returns the value of attribute address.



2
3
4
# File 'lib/DinnerChoice/models/Restaurants.rb', line 2

def address
  @address
end

#average_priceObject

Returns the value of attribute average_price.



2
3
4
# File 'lib/DinnerChoice/models/Restaurants.rb', line 2

def average_price
  @average_price
end

#nameObject

Returns the value of attribute name.



2
3
4
# File 'lib/DinnerChoice/models/Restaurants.rb', line 2

def name
  @name
end

#ratingObject

Returns the value of attribute rating.



2
3
4
# File 'lib/DinnerChoice/models/Restaurants.rb', line 2

def rating
  @rating
end