Sha256: c4a05b150608d5df6387371a704de5c9ce92cd33b771aaa7dd282da6d7b453b2

Contents?: true

Size: 402 Bytes

Versions: 7

Compression:

Stored size: 402 Bytes

Contents

module EMJack
  module Handler
    class Touched
      RESPONSE = /^TOUCHED\r\n/

      def self.handles?(response)
        response =~ RESPONSE
      end

      def self.handle(deferrable, response, body, conn=nil)
        return false unless response =~ RESPONSE

        deferrable.succeed
        true
      end

      EMJack::Connection.register_handler(EMJack::Handler::Touched)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
em-jack-0.1.5 lib/em-jack/handlers/touched.rb
em-jack-0.1.4 lib/em-jack/handlers/touched.rb
em-jack-0.1.3 lib/em-jack/handlers/touched.rb
em-jack-0.1.2 lib/em-jack/handlers/touched.rb
em-jack-0.1.1 lib/em-jack/handlers/touched.rb
em-jack-0.1.0 lib/em-jack/handlers/touched.rb
em-jack-0.0.9 lib/em-jack/handlers/touched.rb