Class: CallbackBatch::Call
- Inherits:
-
Object
- Object
- CallbackBatch::Call
- Defined in:
- lib/callback-batch.rb
Overview
Calls catcher.
Instance Attribute Summary collapse
-
#batch ⇒ EM::Batch
readonly
Holds parent batch object.
-
#target ⇒ Object
Holds the wrapped object.
Instance Method Summary collapse
-
#initialize(batch, target) ⇒ Call
constructor
Constructor.
-
#method_missing(name, *args) ⇒ Object
Missing methods catcher which puts the calls to parent batch.
Constructor Details
#initialize(batch, target) ⇒ Call
Constructor.
227 228 229 230 |
# File 'lib/callback-batch.rb', line 227 def initialize(batch, target) @batch = batch @target = target end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args) ⇒ Object
Missing methods catcher which puts the calls to parent batch.
239 240 241 |
# File 'lib/callback-batch.rb', line 239 def method_missing(name, *args) @batch.put(@target, name, args) end |
Instance Attribute Details
#batch ⇒ EM::Batch (readonly)
Holds parent batch object.
209 210 211 |
# File 'lib/callback-batch.rb', line 209 def batch @batch end |
#target ⇒ Object
Holds the wrapped object.
217 218 219 |
# File 'lib/callback-batch.rb', line 217 def target @target end |