Class: BunnyMock::GetResponse

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#channelBunnyMock::Channel (readonly)



15
16
17
# File 'lib/bunny_mock/get_response.rb', line 15

def channel
  @channel
end

#queueBunnyMock::Queue (readonly)



18
19
20
# File 'lib/bunny_mock/get_response.rb', line 18

def queue
  @queue
end

Class Method Details

.next_delivery_tagInteger



81
82
83
84
# File 'lib/bunny_mock/get_response.rb', line 81

def self.next_delivery_tag
  @delivery_tag ||= 0
  @delivery_tag += 1
end

Instance Method Details

#[](k) ⇒ Object

Accesses delivery properties by key

See Also:

  • Hash#[]


40
41
42
# File 'lib/bunny_mock/get_response.rb', line 40

def [](k)
  @hash[k]
end

#delivery_tagString



60
61
62
# File 'lib/bunny_mock/get_response.rb', line 60

def delivery_tag
  @hash[:delivery_tag]
end

#each(*args, &block) ⇒ Object

Iterates over the delivery properties

See Also:

  • Enumerable#each


34
35
36
# File 'lib/bunny_mock/get_response.rb', line 34

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

#exchangeString



71
72
73
# File 'lib/bunny_mock/get_response.rb', line 71

def exchange
  @hash[:exchange]
end

#redeliveredBoolean Also known as: redelivered?



65
66
67
# File 'lib/bunny_mock/get_response.rb', line 65

def redelivered
  @hash[:redelivered]
end

#routing_keyString



76
77
78
# File 'lib/bunny_mock/get_response.rb', line 76

def routing_key
  @hash[:routing_key]
end

#to_hashHash



45
46
47
# File 'lib/bunny_mock/get_response.rb', line 45

def to_hash
  @hash
end