Sha256: 5795f4100b7ab4b6a9b387724f8476320b59439561ab9e5c920b28dfb4376b9e

Contents?: true

Size: 392 Bytes

Versions: 2

Compression:

Stored size: 392 Bytes

Contents

module EMJack
  module Handler
    class Deleted
      RESPONSE = /^DELETED\r\n/

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

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

        deferrable.succeed
        true
      end

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
em-jack-0.0.6 lib/em-jack/handlers/deleted.rb
em-jack-0.0.5 lib/em-jack/handlers/deleted.rb