Class: TopBeers::Beer
- Inherits:
-
Object
- Object
- TopBeers::Beer
- Defined in:
- lib/top-beers/beer.rb
Constant Summary collapse
- @@all =
[]
Instance Attribute Summary collapse
-
#abv ⇒ Object
Returns the value of attribute abv.
-
#availability ⇒ Object
Returns the value of attribute availability.
-
#ba_score ⇒ Object
Returns the value of attribute ba_score.
-
#brewery ⇒ Object
Returns the value of attribute brewery.
-
#description ⇒ Object
Returns the value of attribute description.
-
#name ⇒ Object
Returns the value of attribute name.
-
#style ⇒ Object
Returns the value of attribute style.
-
#url ⇒ Object
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name) ⇒ Beer
constructor
A new instance of Beer.
Constructor Details
#initialize(name) ⇒ Beer
Returns a new instance of Beer.
6 7 8 9 |
# File 'lib/top-beers/beer.rb', line 6 def initialize(name) @name = name @@all << self end |
Instance Attribute Details
#abv ⇒ Object
Returns the value of attribute abv.
2 3 4 |
# File 'lib/top-beers/beer.rb', line 2 def abv @abv end |
#availability ⇒ Object
Returns the value of attribute availability.
2 3 4 |
# File 'lib/top-beers/beer.rb', line 2 def availability @availability end |
#ba_score ⇒ Object
Returns the value of attribute ba_score.
2 3 4 |
# File 'lib/top-beers/beer.rb', line 2 def ba_score @ba_score end |
#brewery ⇒ Object
Returns the value of attribute brewery.
2 3 4 |
# File 'lib/top-beers/beer.rb', line 2 def brewery @brewery end |
#description ⇒ Object
Returns the value of attribute description.
2 3 4 |
# File 'lib/top-beers/beer.rb', line 2 def description @description end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/top-beers/beer.rb', line 2 def name @name end |
#style ⇒ Object
Returns the value of attribute style.
2 3 4 |
# File 'lib/top-beers/beer.rb', line 2 def style @style end |
#url ⇒ Object
Returns the value of attribute url.
2 3 4 |
# File 'lib/top-beers/beer.rb', line 2 def url @url end |
Class Method Details
.all ⇒ Object
11 12 13 |
# File 'lib/top-beers/beer.rb', line 11 def self.all @@all end |