lib/ruote/engine.rb in ruote-2.1.3 vs lib/ruote/engine.rb in ruote-2.1.4

- old
+ new

@@ -38,11 +38,11 @@ attr_reader :context attr_reader :variables def initialize (worker_or_storage, run=true) - if worker_or_storage.respond_to?(:context) + if worker_or_storage.respond_to?(:storage) @worker = worker_or_storage @storage = @worker.storage @context = @worker.context @context.engine = self @@ -303,9 +303,11 @@ # @engine.add_service('tracer', tracer) # # or # # @engine.add_service('tracer', 'ruote/exp/tracer', 'Ruote::Exp::Tracer') + # + # This method returns the service instance it just bound. # def add_service (name, path_or_instance, classname=nil, opts=nil) @context.add_service(name, path_or_instance, classname, opts) end