Class: Celluloid::Internals::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/celluloid/internals/responses.rb

Overview

Responses to calls

Direct Known Subclasses

Error, Success

Defined Under Namespace

Classes: Block, Error, Success

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(call, value) ⇒ Response

Returns a new instance of Response.



7
8
9
# File 'lib/celluloid/internals/responses.rb', line 7

def initialize(call, value)
  @call, @value = call, value
end

Instance Attribute Details

#callObject (readonly)

Returns the value of attribute call.



5
6
7
# File 'lib/celluloid/internals/responses.rb', line 5

def call
  @call
end

#valueObject (readonly)

Returns the value of attribute value.



5
6
7
# File 'lib/celluloid/internals/responses.rb', line 5

def value
  @value
end

Instance Method Details

#dispatchObject



11
12
13
# File 'lib/celluloid/internals/responses.rb', line 11

def dispatch
  @call.task.resume self
end