Module: Delayer::Deferred

Defined in:
lib/delayer/deferred.rb,
lib/delayer/deferred/chain.rb,
lib/delayer/deferred/error.rb,
lib/delayer/deferred/tools.rb,
lib/delayer/deferred/worker.rb,
lib/delayer/deferred/promise.rb,
lib/delayer/deferred/version.rb,
lib/delayer/deferred/deferred.rb,
lib/delayer/deferred/deferredable.rb

Defined Under Namespace

Modules: Chain, Deferredable, Request, Response, Tools Classes: ForeignCommandAborted, Promise, Worker

Constant Summary collapse

Error =
Class.new(StandardError)
SequenceError =
Class.new(Error) do
  attr_accessor :deferred
  def initialize(message, deferred: nil)
    super(message)
    @deferred = deferred
  end
end
MultipleAssignmentError =
Class.new(SequenceError)
VERSION =
"2.2.0"
Deferred =
Promise

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.debugObject

真ならデバッグ情報を集める


15
16
17
# File 'lib/delayer/deferred.rb', line 15

def debug
  @debug
end

Class Method Details

.method_missing(*rest, **kwrest, &block) ⇒ Object


21
22
23
24
25
26
27
# File 'lib/delayer/deferred.rb', line 21

def method_missing(*rest, **kwrest, &block)
  if kwrest.empty?
    Delayer::Deferred::Promise.__send__(*rest, &block)
  else
    Delayer::Deferred::Promise.__send__(*rest, **kwrest, &block)
  end
end

.new(*rest, name: caller_locations(1,1).first.to_s, &block) ⇒ Object


17
18
19
# File 'lib/delayer/deferred.rb', line 17

def new(*rest, name: caller_locations(1,1).first.to_s, &block)
  super(*rest, name: name, &block)
end

.respond_to_missing?(symbol, include_private) ⇒ Boolean

Returns:

  • (Boolean)

29
30
31
# File 'lib/delayer/deferred.rb', line 29

def respond_to_missing?(symbol, include_private)
  Delayer::Deferred::Promise.respond_to?(symbol, include_private)
end