Class: RestCore::Promise::Future
- Inherits:
- BasicObject
- Defined in:
- lib/rest-core/promise.rb
Instance Method Summary collapse
-
#initialize(promise, target) ⇒ Future
constructor
A new instance of Future.
- #method_missing(msg, *args, &block) ⇒ Object
Constructor Details
#initialize(promise, target) ⇒ Future
Returns a new instance of Future.
9 10 11 |
# File 'lib/rest-core/promise.rb', line 9 def initialize promise, target @promise, @target = promise, target end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(msg, *args, &block) ⇒ Object
13 14 15 |
# File 'lib/rest-core/promise.rb', line 13 def method_missing msg, *args, &block @promise.yield[@target].__send__(msg, *args, &block) end |