Class: Beanbox::Coffee

Inherits:
Object
  • Object
show all
Defined in:
lib/beanbox/coffee.rb

Constant Summary collapse

@@all =
[]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCoffee



5
6
7
# File 'lib/beanbox/coffee.rb', line 5

def initialize
  @@all << self
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



2
3
4
# File 'lib/beanbox/coffee.rb', line 2

def description
  @description
end

#nameObject

Returns the value of attribute name.



2
3
4
# File 'lib/beanbox/coffee.rb', line 2

def name
  @name
end

#priceObject

Returns the value of attribute price.



2
3
4
# File 'lib/beanbox/coffee.rb', line 2

def price
  @price
end

#roast_levelObject

Returns the value of attribute roast_level.



2
3
4
# File 'lib/beanbox/coffee.rb', line 2

def roast_level
  @roast_level
end

#roasterObject

Returns the value of attribute roaster.



2
3
4
# File 'lib/beanbox/coffee.rb', line 2

def roaster
  @roaster
end

#typeObject

Returns the value of attribute type.



2
3
4
# File 'lib/beanbox/coffee.rb', line 2

def type
  @type
end

#urlObject

Returns the value of attribute url.



2
3
4
# File 'lib/beanbox/coffee.rb', line 2

def url
  @url
end

Class Method Details

.allObject



9
10
11
# File 'lib/beanbox/coffee.rb', line 9

def self.all
  @@all
end

.reset!Object



13
14
15
# File 'lib/beanbox/coffee.rb', line 13

def self.reset!
  @@all = []
end