Class: Superbolt::Adapter::AMQP

Inherits:
Base
  • Object
show all
Defined in:
lib/superbolt/adapter/amqp.rb

Instance Attribute Summary

Attributes inherited from Base

#config

Instance Method Summary collapse

Methods inherited from Base

#exchange, #initialize

Constructor Details

This class inherits a constructor from Superbolt::Adapter::Base

Instance Method Details

#channelObject



8
9
10
# File 'lib/superbolt/adapter/amqp.rb', line 8

def channel
  @channel ||= ::AMQP::Channel.new(socket)
end

#close(&block) ⇒ Object



12
13
14
# File 'lib/superbolt/adapter/amqp.rb', line 12

def close(&block)
  socket.close(&block)
end

#socketObject



4
5
6
# File 'lib/superbolt/adapter/amqp.rb', line 4

def socket
  @socket ||= ::AMQP.connect(config.connection_params)
end