Class: Restaurant
- Inherits:
-
Object
- Object
- Restaurant
- Defined in:
- lib/DinnerChoice/models/Restaurants.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#average_price ⇒ Object
Returns the value of attribute average_price.
-
#name ⇒ Object
Returns the value of attribute name.
-
#rating ⇒ Object
Returns the value of attribute rating.
Instance Method Summary collapse
-
#initialize(name, address, rating, average_price) ⇒ Restaurant
constructor
A new instance of Restaurant.
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, , average_price) @name = name @address = address @rating = @average_price = average_price end |
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address.
2 3 4 |
# File 'lib/DinnerChoice/models/Restaurants.rb', line 2 def address @address end |
#average_price ⇒ Object
Returns the value of attribute average_price.
2 3 4 |
# File 'lib/DinnerChoice/models/Restaurants.rb', line 2 def average_price @average_price end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/DinnerChoice/models/Restaurants.rb', line 2 def name @name end |
#rating ⇒ Object
Returns the value of attribute rating.
2 3 4 |
# File 'lib/DinnerChoice/models/Restaurants.rb', line 2 def @rating end |