Class: KJess::Request::Set

Inherits:
KJess::Request show all
Defined in:
lib/kjess/request/set.rb

Constant Summary

Constants inherited from KJess::Request

Registry

Constants inherited from Protocol

Protocol::CRLF

Instance Attribute Summary collapse

Attributes inherited from Protocol

#args, #raw_args

Instance Method Summary collapse

Methods inherited from KJess::Request

registry, valid_responses

Methods inherited from Protocol

arity, #initialize, keyword, #keyword, register

Constructor Details

This class inherits a constructor from KJess::Protocol

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



7
8
9
# File 'lib/kjess/request/set.rb', line 7

def data
  @data
end

Instance Method Details

#parse_options_to_args(opts) ⇒ Object



9
10
11
12
# File 'lib/kjess/request/set.rb', line 9

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

#to_protocolObject



14
15
16
17
# File 'lib/kjess/request/set.rb', line 14

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