lib/artoo/robot.rb in artoo-0.3.0 vs lib/artoo/robot.rb in artoo-0.4.0
- old
+ new
@@ -87,11 +87,11 @@
return if !test? && is_running?
prepare_robots(robot)
unless cli?
Celluloid::Actor[:api] = Api.new(self.api_host, self.api_port) if self.use_api
- Celluloid::Actor[:master].start_work
+ master.start_work
self.running = true
sleep # sleep main thread, and let the work commence!
end
end
@@ -103,9 +103,13 @@
else
robots = [self.new]
end
Celluloid::Actor[:master] = Master.new(robots)
+ end
+
+ def master
+ Celluloid::Actor[:master]
end
def test?
ENV["ARTOO_TEST"] == 'true'
end