class Superbolt::IncomingMessage
Attributes
channel[R]
payload[R]
tag[R]
Public Class Methods
new(delivery_info, payload, channel)
click to toggle source
# File lib/superbolt/incoming_message.rb, line 5 def initialize(delivery_info, payload, channel) @payload = payload @tag = delivery_info.delivery_tag if delivery_info @channel = channel end
Public Instance Methods
ack()
click to toggle source
# File lib/superbolt/incoming_message.rb, line 21 def ack channel.acknowledge(tag) end
parse()
click to toggle source
# File lib/superbolt/incoming_message.rb, line 11 def parse JSON.parse(payload) rescue JSON::ParserError payload end
reject(requeue=true)
click to toggle source
# File lib/superbolt/incoming_message.rb, line 17 def reject(requeue=true) channel.reject(tag, requeue) end