Sha256: 97c0074e75dec6e61751d6349a8e7772640d4561a9b2243a07b009153d826822

Contents?: true

Size: 413 Bytes

Versions: 3

Compression:

Stored size: 413 Bytes

Contents

class KJess::Request
  class Set < KJess::Request
    keyword 'SET'
    arity   4
    valid_responses [ KJess::Response::Stored, KJess::Response::NotStored ]

    attr_reader :data

    def parse_options_to_args( opts )
      @data = opts[:data].to_s
      [ opts[:queue_name], 0, opts[:expiration] || 0 , data.bytesize ]
    end

    def to_protocol
      s = super
      s += "#{data}#{CRLF}"
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
kjess-1.2.0 lib/kjess/request/set.rb
kjess-1.1.0 lib/kjess/request/set.rb
kjess-1.0.0 lib/kjess/request/set.rb