Class: Process::Roulette::Controller::FinishHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/process/roulette/controller/finish_handler.rb

Overview

Handles the FINISH state of the controller state machine, by disconnecting from the croupier.

Instance Method Summary collapse

Constructor Details

#initialize(driver) ⇒ FinishHandler

Returns a new instance of FinishHandler.



8
9
10
# File 'lib/process/roulette/controller/finish_handler.rb', line 8

def initialize(driver)
  @driver = driver
end

Instance Method Details

#runObject



12
13
14
15
16
# File 'lib/process/roulette/controller/finish_handler.rb', line 12

def run
  puts 'terminating...'
  @driver.socket.close
  nil
end