Class: Wine
- Inherits:
-
Object
- Object
- Wine
- Defined in:
- lib/wine_classes.rb
Instance Attribute Summary collapse
-
#budget ⇒ Object
Returns the value of attribute budget.
-
#country_of_origin ⇒ Object
Returns the value of attribute country_of_origin.
-
#grape_variety ⇒ Object
Returns the value of attribute grape_variety.
-
#name ⇒ Object
Returns the value of attribute name.
-
#producer ⇒ Object
Returns the value of attribute producer.
-
#region ⇒ Object
Returns the value of attribute region.
-
#sale_price ⇒ Object
Returns the value of attribute sale_price.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type, name, budget, sale_price, producer, country_of_origin, grape_variety, region) ⇒ Wine
constructor
A new instance of Wine.
Constructor Details
#initialize(type, name, budget, sale_price, producer, country_of_origin, grape_variety, region) ⇒ Wine
Returns a new instance of Wine.
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/wine_classes.rb', line 4 def initialize(type, name, budget, sale_price, producer, country_of_origin, grape_variety, region) @type = type @name = name @budget = budget @sale_price = sale_price @producer = producer @country_of_origin = country_of_origin @grape_variety = grape_variety @region = region end |
Instance Attribute Details
#budget ⇒ Object
Returns the value of attribute budget.
2 3 4 |
# File 'lib/wine_classes.rb', line 2 def budget @budget end |
#country_of_origin ⇒ Object
Returns the value of attribute country_of_origin.
2 3 4 |
# File 'lib/wine_classes.rb', line 2 def country_of_origin @country_of_origin end |
#grape_variety ⇒ Object
Returns the value of attribute grape_variety.
2 3 4 |
# File 'lib/wine_classes.rb', line 2 def grape_variety @grape_variety end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/wine_classes.rb', line 2 def name @name end |
#producer ⇒ Object
Returns the value of attribute producer.
2 3 4 |
# File 'lib/wine_classes.rb', line 2 def producer @producer end |
#region ⇒ Object
Returns the value of attribute region.
2 3 4 |
# File 'lib/wine_classes.rb', line 2 def region @region end |
#sale_price ⇒ Object
Returns the value of attribute sale_price.
2 3 4 |
# File 'lib/wine_classes.rb', line 2 def sale_price @sale_price end |
#type ⇒ Object
Returns the value of attribute type.
2 3 4 |
# File 'lib/wine_classes.rb', line 2 def type @type end |