Class: TopBeers::Beer

Inherits:
Object
  • Object
show all
Defined in:
lib/top-beers/beer.rb

Constant Summary collapse

@@all =
[]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#abvObject

Returns the value of attribute abv.



2
3
4
# File 'lib/top-beers/beer.rb', line 2

def abv
  @abv
end

#availabilityObject

Returns the value of attribute availability.



2
3
4
# File 'lib/top-beers/beer.rb', line 2

def availability
  @availability
end

#ba_scoreObject

Returns the value of attribute ba_score.



2
3
4
# File 'lib/top-beers/beer.rb', line 2

def ba_score
  @ba_score
end

#breweryObject

Returns the value of attribute brewery.



2
3
4
# File 'lib/top-beers/beer.rb', line 2

def brewery
  @brewery
end

#descriptionObject

Returns the value of attribute description.



2
3
4
# File 'lib/top-beers/beer.rb', line 2

def description
  @description
end

#nameObject

Returns the value of attribute name.



2
3
4
# File 'lib/top-beers/beer.rb', line 2

def name
  @name
end

#styleObject

Returns the value of attribute style.



2
3
4
# File 'lib/top-beers/beer.rb', line 2

def style
  @style
end

#urlObject

Returns the value of attribute url.



2
3
4
# File 'lib/top-beers/beer.rb', line 2

def url
  @url
end

Class Method Details

.allObject



11
12
13
# File 'lib/top-beers/beer.rb', line 11

def self.all
  @@all
end