class Pwwka::TestHandler::Message

Simple class to hold a popped message.

You can either access the message contents directly, or splat it for the most commonly-needed aspects:

delivery_info, payload = @test_handler.pop_message

Attributes

delivery_info[R]
payload[R]
properties[R]

Public Class Methods

new(delivery_info, properties, payload) click to toggle source
# File lib/pwwka/test_handler.rb, line 85
def initialize(delivery_info, properties, payload)
  @delivery_info = delivery_info
  @properties = properties
  @raw_payload = payload
  @payload = JSON.parse(@raw_payload)
end

Public Instance Methods

to_ary() click to toggle source

Returns the delivery_info, payload, properties, and raw_payload for splat magic.

# File lib/pwwka/test_handler.rb, line 94
def to_ary
  [@delivery_info,@payload,@properties,@raw_payload]
end