Class: SeattleCraftCoffee::Brewers
- Inherits:
-
Object
- Object
- SeattleCraftCoffee::Brewers
- Defined in:
- lib/seattle_craft_coffee/brewers.rb
Constant Summary collapse
- @@all =
[]
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#name ⇒ Object
Returns the value of attribute name.
-
#neighborhood ⇒ Object
Returns the value of attribute neighborhood.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name, neighborhood, description) ⇒ Brewers
constructor
A new instance of Brewers.
Constructor Details
#initialize(name, neighborhood, description) ⇒ Brewers
Returns a new instance of Brewers.
6 7 8 9 10 11 |
# File 'lib/seattle_craft_coffee/brewers.rb', line 6 def initialize(name, neighborhood, description) @name = name @neighborhood = neighborhood @description = description @@all << self end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
3 4 5 |
# File 'lib/seattle_craft_coffee/brewers.rb', line 3 def description @description end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/seattle_craft_coffee/brewers.rb', line 3 def name @name end |
#neighborhood ⇒ Object
Returns the value of attribute neighborhood.
3 4 5 |
# File 'lib/seattle_craft_coffee/brewers.rb', line 3 def neighborhood @neighborhood end |
Class Method Details
.all ⇒ Object
13 14 15 |
# File 'lib/seattle_craft_coffee/brewers.rb', line 13 def self.all @@all end |