Class: ProMashRec::WaterProfile

Inherits:
Brewser::WaterProfile show all
Defined in:
lib/brewser/engines/promash_rec.rb

Instance Method Summary collapse

Methods inherited from Brewser::WaterProfile

#as_json, json_create

Methods inherited from Brewser::Model

#as_beerxml, #as_brewson, auto_migrate_down!, auto_migrate_up!, auto_upgrade!, default_repository_name

Instance Method Details

#from_promash(water) ⇒ Object



368
369
370
371
372
373
374
375
376
377
378
379
# File 'lib/brewser/engines/promash_rec.rb', line 368

def from_promash(water)
  self.name = water.name.split("\x00")[0]
  self.calcium = water.calcium
  self.magnesium = water.magnesium
  self.sodium = water.sodium
  self.chloride = water.chloride
  self.sulfates = water.sulfate
  self.bicarbonate = water.bicarbonate
  self.ph = water.ph.round(2)
  
  return self
end