class BunnyMock::MessageProperties

Public Class Methods

new(properties) click to toggle source

@private

# File lib/bunny_mock/message_properties.rb, line 15
def initialize(properties)
  properties.delete :exchange
  @properties = properties
end

Public Instance Methods

[](key) click to toggle source

Access properties by key @see Hash#[]

# File lib/bunny_mock/message_properties.rb, line 28
def [](key)
  @properties[key]
end
app_id() click to toggle source

@return [String] Publishing application, as set by the publisher

# File lib/bunny_mock/message_properties.rb, line 104
def app_id
  @properties[:app_id]
end
cluster_id() click to toggle source

@return [String] Cluster ID, as set by the publisher

# File lib/bunny_mock/message_properties.rb, line 109
def cluster_id
  @properties[:cluster_id]
end
content_encoding() click to toggle source

@return [String] (Optional) content encoding of the message, as set by the publisher

# File lib/bunny_mock/message_properties.rb, line 49
def content_encoding
  @properties[:content_encoding]
end
content_type() click to toggle source

@return [String] (Optional) content type of the message, as set by the publisher

# File lib/bunny_mock/message_properties.rb, line 44
def content_type
  @properties[:content_type]
end
correlation_id() click to toggle source

@return [String] What message this message is a reply to (or corresponds to), as set by the publisher

# File lib/bunny_mock/message_properties.rb, line 69
def correlation_id
  @properties[:correlation_id]
end
delivery_mode() click to toggle source

@return [Integer] Delivery mode (persistent or transient)

# File lib/bunny_mock/message_properties.rb, line 59
def delivery_mode
  @properties[:delivery_mode]
end
each(*args, &block) click to toggle source

Iterate over the properties @see Enumerable#each

# File lib/bunny_mock/message_properties.rb, line 22
def each(*args, &block)
  @properties.each(*args, &block)
end
expiration() click to toggle source

@return [String] Message expiration, as set by the publisher

# File lib/bunny_mock/message_properties.rb, line 79
def expiration
  @properties[:expiration]
end
headers() click to toggle source

@return [String] Message headers

# File lib/bunny_mock/message_properties.rb, line 54
def headers
  @properties[:headers]
end
inspect()
Alias for: to_s
message_id() click to toggle source

@return [String] Message ID, as set by the publisher

# File lib/bunny_mock/message_properties.rb, line 84
def message_id
  @properties[:message_id]
end
priority() click to toggle source

@return [Integer] Message priority, as set by the publisher

# File lib/bunny_mock/message_properties.rb, line 64
def priority
  @properties[:priority]
end
reply_to() click to toggle source

@return [String] (Optional) How to reply to the publisher (usually a reply queue name)

# File lib/bunny_mock/message_properties.rb, line 74
def reply_to
  @properties[:reply_to]
end
timestamp() click to toggle source

@return [Time] Message timestamp, as set by the publisher

# File lib/bunny_mock/message_properties.rb, line 89
def timestamp
  @properties[:timestamp]
end
to_hash() click to toggle source

@return [Hash] Hash of message properties

# File lib/bunny_mock/message_properties.rb, line 33
def to_hash
  @properties
end
to_s() click to toggle source

@return [String] String representation of message properties

# File lib/bunny_mock/message_properties.rb, line 38
def to_s
  to_hash.to_s
end
Also aliased as: inspect
type() click to toggle source

@return [String] Message type, as set by the publisher

# File lib/bunny_mock/message_properties.rb, line 94
def type
  @properties[:type]
end
user_id() click to toggle source

@return [String] Publishing user, as set by the publisher

# File lib/bunny_mock/message_properties.rb, line 99
def user_id
  @properties[:user_id]
end