Class: DCell::Actor

Inherits:
Object
  • Object
show all
Defined in:
lib/dcell/actor_proxy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mailbox) ⇒ Actor

Returns a new instance of Actor.



22
23
24
25
26
27
# File 'lib/dcell/actor_proxy.rb', line 22

def initialize(mailbox)
  @mailbox = mailbox
  @thread  = ThreadHandleProxy.new
  @subject = SubjectProxy.new
  @proxy = Celluloid::ActorProxy.new(@thread, @mailbox)
end

Instance Attribute Details

#mailboxObject (readonly)

Returns the value of attribute mailbox.



28
29
30
# File 'lib/dcell/actor_proxy.rb', line 28

def mailbox
  @mailbox
end

#proxyObject (readonly)

Returns the value of attribute proxy.



28
29
30
# File 'lib/dcell/actor_proxy.rb', line 28

def proxy
  @proxy
end

#subjectObject (readonly)

Returns the value of attribute subject.



28
29
30
# File 'lib/dcell/actor_proxy.rb', line 28

def subject
  @subject
end

#threadObject (readonly)

Returns the value of attribute thread.



28
29
30
# File 'lib/dcell/actor_proxy.rb', line 28

def thread
  @thread
end