Class: SeattleCraftCoffee::Brewers

Inherits:
Object
  • Object
show all
Defined in:
lib/seattle_craft_coffee/brewers.rb

Constant Summary collapse

@@all =
[]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#descriptionObject

Returns the value of attribute description.



3
4
5
# File 'lib/seattle_craft_coffee/brewers.rb', line 3

def description
  @description
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/seattle_craft_coffee/brewers.rb', line 3

def name
  @name
end

#neighborhoodObject

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

.allObject



13
14
15
# File 'lib/seattle_craft_coffee/brewers.rb', line 13

def self.all
  @@all
end