class Concurrent::Async::AwaitDelegator
Delegates synchronous, thread-safe method calls to the wrapped object.
@!visibility private
Public Class Methods
new(delegate)
click to toggle source
Create a new delegator object wrapping the given delegate.
@param [AsyncDelegator] delegate the object to wrap and delegate method calls to
# File lib/concurrent-ruby/concurrent/async.rb, line 365 def initialize(delegate) @delegate = delegate end
Public Instance Methods
method_missing(method, *args, &block)
click to toggle source
Delegates method calls to the wrapped object.
@param [Symbol] method the method being called @param [Array] args zero or more arguments to the method
@return [IVar] the result of the method call
@raise [NameError] the object does not respond to `method` method @raise [ArgumentError] the given `args` do not match the arity of `method`
# File lib/concurrent-ruby/concurrent/async.rb, line 378 def method_missing(method, *args, &block) ivar = @delegate.send(method, *args, &block) ivar.wait ivar end
respond_to_missing?(method, include_private = false)
click to toggle source
Check whether the method is responsive
@param [Symbol] method the method being called
Calls superclass method
# File lib/concurrent-ruby/concurrent/async.rb, line 387 def respond_to_missing?(method, include_private = false) @delegate.respond_to?(method) || super end