Class: EMJack::Handler::Using
- Inherits:
-
Object
- Object
- EMJack::Handler::Using
- Defined in:
- lib/em-jack/handlers/using.rb
Constant Summary collapse
- RESPONSE =
/^USING\s+(.*)\r\n/
Class Method Summary collapse
Class Method Details
.handle(deferrable, response, body, conn = nil) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/em-jack/handlers/using.rb', line 10 def self.handle(deferrable, response, body, conn=nil) return false unless response =~ RESPONSE deferrable.succeed($1) true end |
.handles?(response) ⇒ Boolean
6 7 8 |
# File 'lib/em-jack/handlers/using.rb', line 6 def self.handles?(response) response =~ RESPONSE end |