Class: SmartfoxJruby::SfsWorker::ContextWorker
- Inherits:
-
Object
- Object
- SmartfoxJruby::SfsWorker::ContextWorker
- Defined in:
- lib/smartfox_jruby/sfs_worker.rb
Instance Method Summary collapse
- #append_processor(opts = {}, &block) ⇒ Object
- #expect(name, opts = {}, &block) ⇒ Object
-
#initialize(context, worker) ⇒ ContextWorker
constructor
A new instance of ContextWorker.
- #request(name, data = {}, opts = {}) ⇒ Object
Constructor Details
#initialize(context, worker) ⇒ ContextWorker
Returns a new instance of ContextWorker.
101 102 103 104 |
# File 'lib/smartfox_jruby/sfs_worker.rb', line 101 def initialize(context, worker) @context = context @worker = worker end |
Instance Method Details
#append_processor(opts = {}, &block) ⇒ Object
93 94 95 |
# File 'lib/smartfox_jruby/sfs_worker.rb', line 93 def append_processor(opts = {}, &block) @worker.append_processor(opts.merge(:context => @context), &block) end |
#expect(name, opts = {}, &block) ⇒ Object
97 98 99 |
# File 'lib/smartfox_jruby/sfs_worker.rb', line 97 def expect(name, opts={}, &block) @worker.expect(name, opts.merge(:context => @context), &block) end |
#request(name, data = {}, opts = {}) ⇒ Object
89 90 91 |
# File 'lib/smartfox_jruby/sfs_worker.rb', line 89 def request(name, data = {}, opts = {}) @worker.request(name, data, opts.merge(:context => @context)) end |