Class: Process::Roulette::Controller::FinishHandler
- Inherits:
-
Object
- Object
- Process::Roulette::Controller::FinishHandler
- 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
-
#initialize(driver) ⇒ FinishHandler
constructor
A new instance of FinishHandler.
- #run ⇒ Object
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
#run ⇒ Object
12 13 14 15 16 |
# File 'lib/process/roulette/controller/finish_handler.rb', line 12 def run puts 'terminating...' @driver.socket.close nil end |