Class: Krakow::Command::Req

Inherits:
Krakow::Command show all
Defined in:
lib/krakow/command/req.rb

Overview

Re-queue a message

Instance Attribute Summary

Attributes inherited from Krakow::Command

#response

Attributes collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Krakow::Command

#error?, #name, ok, #ok?, response_for

Methods included from Utils::Lazy

included

Methods included from Utils::Logging

level=, #log

Class Method Details

.errorObject



25
26
27
# File 'lib/krakow/command/req.rb', line 25

def error
  %w(E_INVALID E_REQ_FAILED)
end

Instance Method Details

#message_idString

Returns the message_id attribute.

Returns:

  • (String)

    the message_id attribute



15
# File 'lib/krakow/command/req.rb', line 15

attribute :message_id, String, :required => true

#message_id?TrueClass, FalseClass

Returns truthiness of the message_id attribute.

Returns:

  • (TrueClass, FalseClass)

    truthiness of the message_id attribute



15
# File 'lib/krakow/command/req.rb', line 15

attribute :message_id, String, :required => true

#timeoutInteger

Returns the timeout attribute.

Returns:

  • (Integer)

    the timeout attribute



16
# File 'lib/krakow/command/req.rb', line 16

attribute :timeout, Integer, :required => true

#timeout?TrueClass, FalseClass

Returns truthiness of the timeout attribute.

Returns:

  • (TrueClass, FalseClass)

    truthiness of the timeout attribute



16
# File 'lib/krakow/command/req.rb', line 16

attribute :timeout, Integer, :required => true

#to_lineObject



20
21
22
# File 'lib/krakow/command/req.rb', line 20

def to_line
  "#{name} #{message_id} #{self.timeout}\n"
end