Class: Actors

Inherits:
Object
  • Object
show all
Defined in:
lib/ara/actors.rb

Overview

Actors class

Class Method Summary collapse

Class Method Details

.actor_for(route, host, port) ⇒ Object



17
18
19
# File 'lib/ara/actors.rb', line 17

def self.actor_for(route, host, port)
   return RemoteActor.new(route, host, port)
end

.actor_of(klass) ⇒ Object

Create a new Actor with class klass

class MyActor < Actor
  def receive(message)
    ...
  end
end

myActor = Actors.actor_of(MyActor)


13
14
15
# File 'lib/ara/actors.rb', line 13

def self.actor_of(klass)
   return klass.new()
end