Class: Brewscribe::Mash
- Inherits:
-
Object
- Object
- Brewscribe::Mash
- Includes:
- Conversion
- Defined in:
- lib/brewscribe/mash.rb,
lib/brewscribe/mash/step.rb
Defined Under Namespace
Classes: Step
Constant Summary collapse
- KEY_CONVERSION =
{ last_modified: DATE_CONV, grain_weight: FLOAT_CONV, grain_temp: FLOAT_CONV, boil_temp: FLOAT_CONV, tun_temp: FLOAT_CONV, ph: FLOAT_CONV, sparge_temp: FLOAT_CONV, batch: FLOAT_CONV, batch_pct: PERCENT_CONV, batch_even: BOOLEAN_CONV, batch_drain: BOOLEAN_CONV, mash_39: BOOLEAN_CONV, tun_deadspace: FLOAT_CONV, biab_vol: FLOAT_CONV, biab: BOOLEAN_CONV, equip_adjust: BOOLEAN_CONV, tun_vol: FLOAT_CONV, tun_mass: FLOAT_CONV, tun_hc: FLOAT_CONV }
Constants included from Conversion
Conversion::BOOLEAN_CONV, Conversion::DATE_CONV, Conversion::FLOAT_CONV, Conversion::INT_CONV, Conversion::PERCENT_CONV
Instance Attribute Summary collapse
-
#batch ⇒ Object
Returns the value of attribute batch.
-
#batch_drain ⇒ Object
Returns the value of attribute batch_drain.
-
#batch_even ⇒ Object
Returns the value of attribute batch_even.
-
#batch_pct ⇒ Object
Returns the value of attribute batch_pct.
-
#biab ⇒ Object
Returns the value of attribute biab.
-
#biab_vol ⇒ Object
Returns the value of attribute biab_vol.
-
#boil_temp ⇒ Object
Returns the value of attribute boil_temp.
-
#equip_adjust ⇒ Object
Returns the value of attribute equip_adjust.
-
#grain_temp ⇒ Object
Returns the value of attribute grain_temp.
-
#grain_weight ⇒ Object
Returns the value of attribute grain_weight.
-
#last_modified ⇒ Object
Returns the value of attribute last_modified.
-
#mash_39 ⇒ Object
Returns the value of attribute mash_39.
-
#name ⇒ Object
Returns the value of attribute name.
-
#notes ⇒ Object
Returns the value of attribute notes.
-
#ph ⇒ Object
Returns the value of attribute ph.
-
#sparge_temp ⇒ Object
Returns the value of attribute sparge_temp.
-
#steps ⇒ Object
Returns the value of attribute steps.
-
#tun_deadspace ⇒ Object
Returns the value of attribute tun_deadspace.
-
#tun_hc ⇒ Object
Returns the value of attribute tun_hc.
-
#tun_mass ⇒ Object
Returns the value of attribute tun_mass.
-
#tun_temp ⇒ Object
Returns the value of attribute tun_temp.
-
#tun_vol ⇒ Object
Returns the value of attribute tun_vol.
Class Method Summary collapse
Methods included from Conversion
Instance Attribute Details
#batch ⇒ Object
Returns the value of attribute batch.
5 6 7 |
# File 'lib/brewscribe/mash.rb', line 5 def batch @batch end |
#batch_drain ⇒ Object
Returns the value of attribute batch_drain.
5 6 7 |
# File 'lib/brewscribe/mash.rb', line 5 def batch_drain @batch_drain end |
#batch_even ⇒ Object
Returns the value of attribute batch_even.
5 6 7 |
# File 'lib/brewscribe/mash.rb', line 5 def batch_even @batch_even end |
#batch_pct ⇒ Object
Returns the value of attribute batch_pct.
5 6 7 |
# File 'lib/brewscribe/mash.rb', line 5 def batch_pct @batch_pct end |
#biab ⇒ Object
Returns the value of attribute biab.
5 6 7 |
# File 'lib/brewscribe/mash.rb', line 5 def biab @biab end |
#biab_vol ⇒ Object
Returns the value of attribute biab_vol.
5 6 7 |
# File 'lib/brewscribe/mash.rb', line 5 def biab_vol @biab_vol end |
#boil_temp ⇒ Object
Returns the value of attribute boil_temp.
5 6 7 |
# File 'lib/brewscribe/mash.rb', line 5 def boil_temp @boil_temp end |
#equip_adjust ⇒ Object
Returns the value of attribute equip_adjust.
5 6 7 |
# File 'lib/brewscribe/mash.rb', line 5 def equip_adjust @equip_adjust end |
#grain_temp ⇒ Object
Returns the value of attribute grain_temp.
5 6 7 |
# File 'lib/brewscribe/mash.rb', line 5 def grain_temp @grain_temp end |
#grain_weight ⇒ Object
Returns the value of attribute grain_weight.
5 6 7 |
# File 'lib/brewscribe/mash.rb', line 5 def grain_weight @grain_weight end |
#last_modified ⇒ Object
Returns the value of attribute last_modified.
5 6 7 |
# File 'lib/brewscribe/mash.rb', line 5 def last_modified @last_modified end |
#mash_39 ⇒ Object
Returns the value of attribute mash_39.
5 6 7 |
# File 'lib/brewscribe/mash.rb', line 5 def mash_39 @mash_39 end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/brewscribe/mash.rb', line 5 def name @name end |
#notes ⇒ Object
Returns the value of attribute notes.
5 6 7 |
# File 'lib/brewscribe/mash.rb', line 5 def notes @notes end |
#ph ⇒ Object
Returns the value of attribute ph.
5 6 7 |
# File 'lib/brewscribe/mash.rb', line 5 def ph @ph end |
#sparge_temp ⇒ Object
Returns the value of attribute sparge_temp.
5 6 7 |
# File 'lib/brewscribe/mash.rb', line 5 def sparge_temp @sparge_temp end |
#steps ⇒ Object
Returns the value of attribute steps.
5 6 7 |
# File 'lib/brewscribe/mash.rb', line 5 def steps @steps end |
#tun_deadspace ⇒ Object
Returns the value of attribute tun_deadspace.
5 6 7 |
# File 'lib/brewscribe/mash.rb', line 5 def tun_deadspace @tun_deadspace end |
#tun_hc ⇒ Object
Returns the value of attribute tun_hc.
5 6 7 |
# File 'lib/brewscribe/mash.rb', line 5 def tun_hc @tun_hc end |
#tun_mass ⇒ Object
Returns the value of attribute tun_mass.
5 6 7 |
# File 'lib/brewscribe/mash.rb', line 5 def tun_mass @tun_mass end |
#tun_temp ⇒ Object
Returns the value of attribute tun_temp.
5 6 7 |
# File 'lib/brewscribe/mash.rb', line 5 def tun_temp @tun_temp end |
#tun_vol ⇒ Object
Returns the value of attribute tun_vol.
5 6 7 |
# File 'lib/brewscribe/mash.rb', line 5 def tun_vol @tun_vol end |
Class Method Details
.from_data(data) ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/brewscribe/mash.rb', line 34 def self.from_data data mash = new mash.data_to_properties data if mash.steps[:data][:mashstep].class == Hash steps = [mash.steps[:data][:mashstep]] else steps = mash.steps[:data][:mashstep] end mash.steps = [] steps.each do |step| mash.steps << Brewscribe::Mash::Step.from_data(step) end mash end |