Class: EventPeople::Broker::Rabbit::RabbitContext
- Inherits:
-
Context
- Object
- Context
- EventPeople::Broker::Rabbit::RabbitContext
show all
- Defined in:
- lib/event_people/broker/rabbit/rabbit_context.rb
Instance Method Summary
collapse
Methods inherited from Context
#fail!, #reject!, #success!
Constructor Details
#initialize(channel, delivery_info) ⇒ RabbitContext
Returns a new instance of RabbitContext.
4
5
6
7
|
# File 'lib/event_people/broker/rabbit/rabbit_context.rb', line 4
def initialize(channel, delivery_info)
@channel = channel
@delivery_info = delivery_info
end
|
Instance Method Details
#fail ⇒ Object
13
14
15
|
# File 'lib/event_people/broker/rabbit/rabbit_context.rb', line 13
def fail
@channel.nack(@delivery_info.delivery_tag, false, true)
end
|
#reject ⇒ Object
17
18
19
|
# File 'lib/event_people/broker/rabbit/rabbit_context.rb', line 17
def reject
@channel.reject(@delivery_info.delivery_tag, false)
end
|
#success ⇒ Object
9
10
11
|
# File 'lib/event_people/broker/rabbit/rabbit_context.rb', line 9
def success
@channel.ack(@delivery_info.delivery_tag, false)
end
|