Module: Nestene

Defined in:
lib/nestene.rb,
lib/nestene/ui/app.rb,
lib/nestene/storage.rb,
lib/nestene/version.rb,
lib/nestene/callback.rb,
lib/nestene/actor/core.rb,
lib/nestene/auton_state.rb,
lib/nestene/auton_context.rb,
lib/nestene/delayed_method.rb,
lib/nestene/executed_method.rb,
lib/nestene/execution_error.rb,
lib/nestene/executing_method.rb,
lib/nestene/scheduled_method.rb,
lib/nestene/actor/auton_queue.rb,
lib/nestene/actor/auton_storage.rb,
lib/nestene/auton_execution_queue.rb,
lib/nestene/actor/delayed_scheduler.rb

Defined Under Namespace

Modules: Actor, Ui Classes: Auton, AutonContext, AutonExecutionQueue, AutonState, Callback, DelayedMethod, DiskStorage, ExecutedMethod, ExecutingMethod, ExecutionError, FileNameConverter, FooAuton, MemoryStorage, Registry, ScheduledMethod, SelfValue

Constant Summary collapse

VERSION =
"0.2.1"

Class Method Summary collapse

Class Method Details

.class_from_string(name) ⇒ Object



61
62
63
64
65
# File 'lib/nestene.rb', line 61

def self.class_from_string(name)
  name.split('::').inject(Object) do |mod, class_name|
    mod.const_get(class_name) or raise "Could not find class #{name}"
  end
end

.start_nestene(storage) ⇒ Object



67
68
69
70
71
72
73
74
75
76
# File 'lib/nestene.rb', line 67

def self.start_nestene(storage)
  Celluloid::Actor[:nestene_core] = Nestene::Actor::Core.new(storage)
  Celluloid::Actor[:delayed_scheduler] = Nestene::Actor::DelayedScheduler.new
  Celluloid::Actor[:auton_queue] = Nestene::Actor::AutonQueue.new
  storage.list.each do |auton_id|
    storage_actor=Nestene::Actor::AutonStorage.new(auton_id, storage)
    Celluloid::Actor["storage:%s" % auton_id] = storage_actor
    storage_actor.publish_initial_state
  end
end