Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

32 lines (25 sloc) 0.477 kb
require 'celluloid'
class Rocket
include Celluloid
def initialize(autolaunch = false)
launch! if autolaunch
end
def launch
3.downto(1) do |n|
puts "#{n}..."
sleep 1
raise "Houston, we have a problem" if [true, false].sample
end
puts "Blast off!"
end
end
class Launcher
include Celluloid
trap_exit :relaunch
def launch_rocket
Rocket.new_link.launch!
end
def relaunch(actor, reason)
launch_rocket
end
end
Jump to Line
Something went wrong with that request. Please try again.