Class: Actors
- Inherits:
-
Object
- Object
- Actors
- Defined in:
- lib/ara/actors.rb
Overview
Actors class
Class Method Summary collapse
- .actor_for(route, host, port) ⇒ Object
-
.actor_of(klass) ⇒ Object
Create a new Actor with class klass.
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 |