Class: Brewscribe::Yeast
- Inherits:
-
Object
- Object
- Brewscribe::Yeast
- Includes:
- Conversion
- Defined in:
- lib/brewscribe/yeast.rb
Constant Summary collapse
- FLOCCULATION_TYPES =
['Low', 'Medium', 'High', 'Very High']
- TYPES =
['Ale', 'Lager', 'Wine', 'Champagne', 'Wheat']
- FORMS =
['Liquid', 'Dry', 'Slant', 'Culture']
- KEY_CONVERSION =
{ product_id: INT_CONV, flocculation: ->(k) { FLOCCULATION_TYPES[k.to_i] }, type: ->(k) { TYPES[k.to_i] }, last_modified: DATE_CONV, form: ->(k) { FORMS[k.to_i] }, starter_size: FLOAT_CONV, amount: FLOAT_CONV, price: FLOAT_CONV, in_recipe: BOOLEAN_CONV, brew_date: DATE_CONV, pkg_date: DATE_CONV, cells: FLOAT_CONV, min_attenuation: PERCENT_CONV, max_attenuation: PERCENT_CONV, min_temp: FLOAT_CONV, max_temp: FLOAT_CONV, use_starter: BOOLEAN_CONV, add_to_secondary: BOOLEAN_CONV, times_cultured: INT_CONV, max_reuse: INT_CONV, culture_date: DATE_CONV }
Constants included from Conversion
Conversion::BOOLEAN_CONV, Conversion::DATE_CONV, Conversion::FLOAT_CONV, Conversion::INT_CONV, Conversion::PERCENT_CONV
Instance Attribute Summary collapse
-
#add_to_secondary ⇒ Object
readonly
Returns the value of attribute add_to_secondary.
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#best_for ⇒ Object
readonly
Returns the value of attribute best_for.
-
#brew_date ⇒ Object
readonly
Returns the value of attribute brew_date.
-
#cells ⇒ Object
readonly
Returns the value of attribute cells.
-
#culture_date ⇒ Object
readonly
Returns the value of attribute culture_date.
-
#flocculation ⇒ Object
readonly
Returns the value of attribute flocculation.
-
#form ⇒ Object
readonly
Returns the value of attribute form.
-
#in_recipe ⇒ Object
readonly
Returns the value of attribute in_recipe.
-
#lab ⇒ Object
readonly
Returns the value of attribute lab.
-
#last_modified ⇒ Object
readonly
Returns the value of attribute last_modified.
-
#max_attenuation ⇒ Object
readonly
Returns the value of attribute max_attenuation.
-
#max_reuse ⇒ Object
readonly
Returns the value of attribute max_reuse.
-
#max_temp ⇒ Object
readonly
Returns the value of attribute max_temp.
-
#min_attenuation ⇒ Object
readonly
Returns the value of attribute min_attenuation.
-
#min_temp ⇒ Object
readonly
Returns the value of attribute min_temp.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#notes ⇒ Object
readonly
Returns the value of attribute notes.
-
#pkg_date ⇒ Object
readonly
Returns the value of attribute pkg_date.
-
#price ⇒ Object
readonly
Returns the value of attribute price.
-
#product_id ⇒ Object
readonly
Returns the value of attribute product_id.
-
#starter_size ⇒ Object
readonly
Returns the value of attribute starter_size.
-
#times_cultured ⇒ Object
readonly
Returns the value of attribute times_cultured.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#use_starter ⇒ Object
readonly
Returns the value of attribute use_starter.
Instance Method Summary collapse
-
#initialize(data) ⇒ Yeast
constructor
A new instance of Yeast.
Methods included from Conversion
Constructor Details
#initialize(data) ⇒ Yeast
Returns a new instance of Yeast.
38 39 40 41 42 |
# File 'lib/brewscribe/yeast.rb', line 38 def initialize data @original_data = data data_to_properties data end |
Instance Attribute Details
#add_to_secondary ⇒ Object (readonly)
Returns the value of attribute add_to_secondary.
3 4 5 |
# File 'lib/brewscribe/yeast.rb', line 3 def add_to_secondary @add_to_secondary end |
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
3 4 5 |
# File 'lib/brewscribe/yeast.rb', line 3 def amount @amount end |
#best_for ⇒ Object (readonly)
Returns the value of attribute best_for.
3 4 5 |
# File 'lib/brewscribe/yeast.rb', line 3 def best_for @best_for end |
#brew_date ⇒ Object (readonly)
Returns the value of attribute brew_date.
3 4 5 |
# File 'lib/brewscribe/yeast.rb', line 3 def brew_date @brew_date end |
#cells ⇒ Object (readonly)
Returns the value of attribute cells.
3 4 5 |
# File 'lib/brewscribe/yeast.rb', line 3 def cells @cells end |
#culture_date ⇒ Object (readonly)
Returns the value of attribute culture_date.
3 4 5 |
# File 'lib/brewscribe/yeast.rb', line 3 def culture_date @culture_date end |
#flocculation ⇒ Object (readonly)
Returns the value of attribute flocculation.
3 4 5 |
# File 'lib/brewscribe/yeast.rb', line 3 def flocculation @flocculation end |
#form ⇒ Object (readonly)
Returns the value of attribute form.
3 4 5 |
# File 'lib/brewscribe/yeast.rb', line 3 def form @form end |
#in_recipe ⇒ Object (readonly)
Returns the value of attribute in_recipe.
3 4 5 |
# File 'lib/brewscribe/yeast.rb', line 3 def in_recipe @in_recipe end |
#lab ⇒ Object (readonly)
Returns the value of attribute lab.
3 4 5 |
# File 'lib/brewscribe/yeast.rb', line 3 def lab @lab end |
#last_modified ⇒ Object (readonly)
Returns the value of attribute last_modified.
3 4 5 |
# File 'lib/brewscribe/yeast.rb', line 3 def last_modified @last_modified end |
#max_attenuation ⇒ Object (readonly)
Returns the value of attribute max_attenuation.
3 4 5 |
# File 'lib/brewscribe/yeast.rb', line 3 def max_attenuation @max_attenuation end |
#max_reuse ⇒ Object (readonly)
Returns the value of attribute max_reuse.
3 4 5 |
# File 'lib/brewscribe/yeast.rb', line 3 def max_reuse @max_reuse end |
#max_temp ⇒ Object (readonly)
Returns the value of attribute max_temp.
3 4 5 |
# File 'lib/brewscribe/yeast.rb', line 3 def max_temp @max_temp end |
#min_attenuation ⇒ Object (readonly)
Returns the value of attribute min_attenuation.
3 4 5 |
# File 'lib/brewscribe/yeast.rb', line 3 def min_attenuation @min_attenuation end |
#min_temp ⇒ Object (readonly)
Returns the value of attribute min_temp.
3 4 5 |
# File 'lib/brewscribe/yeast.rb', line 3 def min_temp @min_temp end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/brewscribe/yeast.rb', line 3 def name @name end |
#notes ⇒ Object (readonly)
Returns the value of attribute notes.
3 4 5 |
# File 'lib/brewscribe/yeast.rb', line 3 def notes @notes end |
#pkg_date ⇒ Object (readonly)
Returns the value of attribute pkg_date.
3 4 5 |
# File 'lib/brewscribe/yeast.rb', line 3 def pkg_date @pkg_date end |
#price ⇒ Object (readonly)
Returns the value of attribute price.
3 4 5 |
# File 'lib/brewscribe/yeast.rb', line 3 def price @price end |
#product_id ⇒ Object (readonly)
Returns the value of attribute product_id.
3 4 5 |
# File 'lib/brewscribe/yeast.rb', line 3 def product_id @product_id end |
#starter_size ⇒ Object (readonly)
Returns the value of attribute starter_size.
3 4 5 |
# File 'lib/brewscribe/yeast.rb', line 3 def starter_size @starter_size end |
#times_cultured ⇒ Object (readonly)
Returns the value of attribute times_cultured.
3 4 5 |
# File 'lib/brewscribe/yeast.rb', line 3 def times_cultured @times_cultured end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
3 4 5 |
# File 'lib/brewscribe/yeast.rb', line 3 def type @type end |
#use_starter ⇒ Object (readonly)
Returns the value of attribute use_starter.
3 4 5 |
# File 'lib/brewscribe/yeast.rb', line 3 def use_starter @use_starter end |