Class: Lexster::BatchPromiseProxy
- Inherits:
-
Object
- Object
- Lexster::BatchPromiseProxy
- Defined in:
- lib/lexster/batch.rb
Overview
returned from a full batch, after it has been executed, so a ‘.then` can be chained after the batch do … end it proxies all methods to the result
Instance Method Summary collapse
-
#initialize(results) ⇒ BatchPromiseProxy
constructor
A new instance of BatchPromiseProxy.
- #method_missing(method, *args) ⇒ Object
- #then {|@results| ... } ⇒ Object
Constructor Details
#initialize(results) ⇒ BatchPromiseProxy
Returns a new instance of BatchPromiseProxy.
122 123 124 |
# File 'lib/lexster/batch.rb', line 122 def initialize(results) @results = results end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
126 127 128 |
# File 'lib/lexster/batch.rb', line 126 def method_missing(method, *args) @results.send(method, *args) end |
Instance Method Details
#then {|@results| ... } ⇒ Object
130 131 132 |
# File 'lib/lexster/batch.rb', line 130 def then yield(@results) end |