Class: KJess::Request::Get

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

Constant Summary

Constants inherited from KJess::Request

Registry

Constants inherited from Protocol

Protocol::CRLF

Instance Attribute Summary

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, #to_protocol

Constructor Details

This class inherits a constructor from KJess::Protocol

Instance Method Details

#parse_options_to_args(opts) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/kjess/request/get.rb', line 7

def parse_options_to_args( opts )
  a = [ opts[:queue_name] ]

  a << "t=#{opts[:wait_for]}" if opts[:wait_for]

  [ :open, :close, :abort, :peek ].each do |o|
    a << o.to_s if opts[o]
  end

  [ a.join("/") ]
end