#---
# Excerpted from "The ThoughtWorks Anthology",
# published by The Pragmatic Bookshelf.
# Copyrights apply to this code. It may not be used to create training material, 
# courses, books, articles, and the like. Contact us if you are in doubt.
# We make no guarantees that this code is fit for any purpose. 
# Visit http://www.pragmaticprogrammer.com/titles/twa for more book information.
#---
# taking the example from case 3 and doing it with temps instead of
# closures

config = ConfigurationBuilder.new
config.item :secure_air_vent

item =   config.item(:acid_bath) 
acid = Resources.acid
item.uses(acid)
acid.type = :hcl
acid.grade = 5
item.uses(Resources.electricity(12))

item = config.item(:camera)
item.uses(Resources.electricity(1))

item = config.item(:small_power_plant)
item.provides(Resources.electricity(11))
item.depends_on(:secure_air_vent)
