Class: BunnyMock::MessageProperties

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/bunny_mock/message_properties.rb

Instance Method Summary collapse

Instance Method Details

#[](key) ⇒ Object

Access properties by key

See Also:

  • Hash#[]


28
29
30
# File 'lib/bunny_mock/message_properties.rb', line 28

def [](key)
  @properties[key]
end

#app_idString



104
105
106
# File 'lib/bunny_mock/message_properties.rb', line 104

def app_id
  @properties[:app_id]
end

#cluster_idString



109
110
111
# File 'lib/bunny_mock/message_properties.rb', line 109

def cluster_id
  @properties[:cluster_id]
end

#content_encodingString



49
50
51
# File 'lib/bunny_mock/message_properties.rb', line 49

def content_encoding
  @properties[:content_encoding]
end

#content_typeString



44
45
46
# File 'lib/bunny_mock/message_properties.rb', line 44

def content_type
  @properties[:content_type]
end

#correlation_idString



69
70
71
# File 'lib/bunny_mock/message_properties.rb', line 69

def correlation_id
  @properties[:correlation_id]
end

#delivery_modeInteger



59
60
61
# File 'lib/bunny_mock/message_properties.rb', line 59

def delivery_mode
  @properties[:delivery_mode]
end

#each(*args, &block) ⇒ Object

Iterate over the properties

See Also:

  • Enumerable#each


22
23
24
# File 'lib/bunny_mock/message_properties.rb', line 22

def each(*args, &block)
  @properties.each(*args, &block)
end

#expirationString



79
80
81
# File 'lib/bunny_mock/message_properties.rb', line 79

def expiration
  @properties[:expiration]
end

#headersString



54
55
56
# File 'lib/bunny_mock/message_properties.rb', line 54

def headers
  @properties[:headers]
end

#message_idString



84
85
86
# File 'lib/bunny_mock/message_properties.rb', line 84

def message_id
  @properties[:message_id]
end

#priorityInteger



64
65
66
# File 'lib/bunny_mock/message_properties.rb', line 64

def priority
  @properties[:priority]
end

#reply_toString



74
75
76
# File 'lib/bunny_mock/message_properties.rb', line 74

def reply_to
  @properties[:reply_to]
end

#timestampTime



89
90
91
# File 'lib/bunny_mock/message_properties.rb', line 89

def timestamp
  @properties[:timestamp]
end

#to_hashHash



33
34
35
# File 'lib/bunny_mock/message_properties.rb', line 33

def to_hash
  @properties
end

#to_sString Also known as: inspect



38
39
40
# File 'lib/bunny_mock/message_properties.rb', line 38

def to_s
  to_hash.to_s
end

#typeString



94
95
96
# File 'lib/bunny_mock/message_properties.rb', line 94

def type
  @properties[:type]
end

#user_idString



99
100
101
# File 'lib/bunny_mock/message_properties.rb', line 99

def user_id
  @properties[:user_id]
end