Class: Whiskey::Server::Handler

Inherits:
Object
  • Object
show all
Defined in:
lib/whiskey/server/handler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(connection) ⇒ Handler

Returns a new instance of Handler.



6
7
8
# File 'lib/whiskey/server/handler.rb', line 6

def initialize(connection)
  @connection = connection
end

Instance Attribute Details

#connectionObject (readonly)

Returns the value of attribute connection.



4
5
6
# File 'lib/whiskey/server/handler.rb', line 4

def connection
  @connection
end

Instance Method Details

#handleObject



10
11
12
13
14
# File 'lib/whiskey/server/handler.rb', line 10

def handle
  loop do
    connection.process
  end
end