Class: Whiskey::Server::Handler
- Inherits:
-
Object
- Object
- Whiskey::Server::Handler
- Defined in:
- lib/whiskey/server/handler.rb
Instance Attribute Summary collapse
-
#connection ⇒ Object
readonly
Returns the value of attribute connection.
Instance Method Summary collapse
- #handle ⇒ Object
-
#initialize(connection) ⇒ Handler
constructor
A new instance of Handler.
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
#connection ⇒ Object (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
#handle ⇒ Object
10 11 12 13 14 |
# File 'lib/whiskey/server/handler.rb', line 10 def handle loop do connection.process end end |