| Speaking the Lingo | [ Prev | Home | Next ] |
RouteState = OpenStruct.new
RouteState.queues = Hash.new
def route(name)
RouteState.route = Route.new(name)
yield if block_given?
end
def step(name)
RouteState.step = Step.new(intern_queue(name))
RouteState.route.add(RouteState.step)
yield if block_given?
end
def on(code, options)
step = Route.find(options[:route], options[:step])
alt = Alternative.new(code, step)
RouteState.step.add(alt)
end
| RubyConf.new(2005) | Copyright © 2005 by Jim Weirich (Some Rights Reserved) |