Class: Beanbox::Coffee
- Inherits:
-
Object
- Object
- Beanbox::Coffee
- Defined in:
- lib/beanbox/coffee.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.
-
#price ⇒ Object
Returns the value of attribute price.
-
#roast_level ⇒ Object
Returns the value of attribute roast_level.
-
#roaster ⇒ Object
Returns the value of attribute roaster.
-
#type ⇒ Object
Returns the value of attribute type.
-
#url ⇒ Object
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Coffee
constructor
A new instance of Coffee.
Constructor Details
#initialize ⇒ Coffee
5 6 7 |
# File 'lib/beanbox/coffee.rb', line 5 def initialize @@all << self end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
2 3 4 |
# File 'lib/beanbox/coffee.rb', line 2 def description @description end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/beanbox/coffee.rb', line 2 def name @name end |
#price ⇒ Object
Returns the value of attribute price.
2 3 4 |
# File 'lib/beanbox/coffee.rb', line 2 def price @price end |
#roast_level ⇒ Object
Returns the value of attribute roast_level.
2 3 4 |
# File 'lib/beanbox/coffee.rb', line 2 def roast_level @roast_level end |
#roaster ⇒ Object
Returns the value of attribute roaster.
2 3 4 |
# File 'lib/beanbox/coffee.rb', line 2 def roaster @roaster end |
#type ⇒ Object
Returns the value of attribute type.
2 3 4 |
# File 'lib/beanbox/coffee.rb', line 2 def type @type end |
#url ⇒ Object
Returns the value of attribute url.
2 3 4 |
# File 'lib/beanbox/coffee.rb', line 2 def url @url end |
Class Method Details
.all ⇒ Object
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 |