Skip to content

Instantly share code, notes, and snippets.

@nanodeath
Created January 25, 2010 05:33
Show Gist options
  • Save nanodeath/285655 to your computer and use it in GitHub Desktop.
Save nanodeath/285655 to your computer and use it in GitHub Desktop.
module Recipe
class BeerShiitakeCabbageSoup < Recipe::Soup
author = "Esther"
programmer = "Max"
note.from_author.message = "This is a completely original Esther recipe inspired by the leftovers in my fridge. Max and I both loved it, so I hope you enjoy :-)"
assemble :ingredients do
peas = Pea.buy(:quantity => 1..2.cups, :variety => :black_eyed, :condition => :dry)
onions = Onion.buy(:quantity => 0.5).and_prepare_by(:chop)
cabbage = Cabbage.buy(:quantity => (1.5)..2.cups).and_prepare_by(:slice => :ribbons)
mushooms = Mushroom.buy(:quantity => 2..(2.5).cups, :variety => :shiitake).and_prepare_by(:slice)
potatoes = Potato.buy(:quantity => 2).and_prepare_by(:mash)
carrots = Carrot.buy(:quantity => 2).and_prepare_by(:slice)
beer = Beer.buy(:quantity => 1, :quality => :delicious)
seasoning = (SoySauce.buy() || Salt.buy()).to_spice
vinegar = Vinegar.buy(:quantity => 2.tbsp, :variety => :apple_cider).to_spice
brown_spice = Spice.buy(:quantity => 1.tbsp, :variety => :cumin)
green_spice = Spice.buy(:quantity => 1.tbsp, :variety => :italian_seasoning)
leaves = Spice.buy(:quantity => 2, :variety => :bay_leaves)
dumplings = Recipe.get(:butternut_squash_dumplings, :page => 18).prepare
seasonings = Spice.combine(seasoning, vinegar, brown_spice, green_spice, leaves)
end
assemble :gear do
pot = Kitchen::Pot.fetch
pressure_cooker = Kitchen::PressureCooker.fetch
abort_recipe unless pot or pressure_cooker
bowl = Kitchen::Bowl.fetch
water = Kitchen::Tap.fetch(:water)
end
define_recipe :beer_shiitake_cabbage_soup do
# 1
if(pot)
pot.add(water).and_boil.wait_until(water.is(Water::State::BOILING))
pot.add(peas).wait_for(15.minutes)
pot.reduce_heat.simmer.wait_for(30.minutes).wait_until(peas.are(Food::Consistency::EDIBLE).but("not quite done"))
elsif(pressure_cooker)
pressure_cooker.add(water).add(peas).add_lid.alter_heat(:to_high).wait_until(pot.is(Container::Pressure::PRESSURIZED)).alter_heat(:to_low)
pressure_cooker.wait(15.minutes)
pressure_cooker.alter_heat(:to_off).wait_until(pot.is(Container::Pressure::NOT_PRESSURIZED)).remove_lid
end
container = pot or pressure_cooker
broth = container.get(:broth)
# the bean broth will become the soup broth
beans.do_not_drain
# 2
# So the mashed potatoes mix evenly into the soup
potato_mix = bowl.add(potatoes).add(broth, :quantity => :some).and_prepare_by(:mixing).get(:contents)
container.add(potato_mix.get(:all)).add(onions).add(mushrooms).add(carrots).add(cabbage).add(beer).add(seasonings)
container.simmer(20.minutes).or_until(carrots, :condition => "teeny bit crunchier than desired consistency")
# 3
# Let the flavors mix up!
container.add(dumplings).simmer(10.minutes)
container.get(:contents).eat!.except(leaves) # bay leaves aren't really edible! enjoy!
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment