Module: Rack::App::Worker::Register
Instance Method Summary collapse
Instance Method Details
#[](name) ⇒ Object
16 17 18 |
# File 'lib/rack/app/worker/register.rb', line 16 def [](name) worker_definitions[name.to_sym] end |
#add(name, class_constructor) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/rack/app/worker/register.rb', line 9 def add(name,class_constructor) builder = Rack::App::Worker::Register::Builder.new(name.to_sym) builder.consumer(class_constructor) worker_definitions[name.to_sym]= builder.to_def nil end |
#worker_definitions ⇒ Object
20 21 22 |
# File 'lib/rack/app/worker/register.rb', line 20 def worker_definitions @worker_definitions ||= {} end |