Skip to content

Instantly share code, notes, and snippets.

@danielgtaylor
Created May 1, 2013 15:50
Show Gist options
  • Save danielgtaylor/5496116 to your computer and use it in GitHub Desktop.
Save danielgtaylor/5496116 to your computer and use it in GitHub Desktop.
Brauhaus.js mashing example
Brauhaus = require 'brauhaus'
# Create a new recipe
recipe = new Brauhaus.Recipe
name: 'My new recipe'
batchSize: 20.0
# Add some grain to be mashed
recipe.add 'fermentable',
name: 'Pale malt'
weight: 4.2
yield: 75.0
# Create a new mash
recipe.mash = new Brauhaus.Mash()
# Add a 60 minute infusion at 68C with
# 2.75 liters per kilogram of grain
recipe.mash.addStep
name: 'Saccharification'
type: 'Infusion'
time: 60
temp: 68
waterRatio: 2.75
# Export recipe to BeerXML
beerxml = recipe.toBeerXml()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment