class Process::Roulette::Croupier::FinishHandler
The FinishHandler
encapsulates the “finish” state of the croupier state machine. It closes all player and controller sockets and terminates the state machine.
Public Class Methods
new(croupier)
click to toggle source
# File lib/process/roulette/croupier/finish_handler.rb, line 9 def initialize(croupier) @croupier = croupier end
Public Instance Methods
run()
click to toggle source
# File lib/process/roulette/croupier/finish_handler.rb, line 13 def run @croupier.sockets.each do |socket| socket.send_packet('EXIT') socket.close end nil end