Class: Hopper::Channel::Queue

Inherits:
Object
  • Object
show all
Defined in:
lib/hopper/channel/queue.rb,
lib/hopper/channel/queue/listener.rb,
lib/hopper/channel/queue/publisher.rb

Defined Under Namespace

Classes: Listener, Proxy, Publisher

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(channel, queue) ⇒ Queue

Returns a new instance of Queue.



24
25
26
27
28
# File 'lib/hopper/channel/queue.rb', line 24

def initialize(channel,queue)
  @channel = channel
  @queue = queue

end

Instance Attribute Details

#queueObject (readonly)

Returns the value of attribute queue.



30
31
32
# File 'lib/hopper/channel/queue.rb', line 30

def queue
  @queue
end

Instance Method Details

#listener(opts = {}) ⇒ Object



32
33
34
# File 'lib/hopper/channel/queue.rb', line 32

def listener(opts = {})
  Hopper::Channel::Queue::Listener.new(proxy, opts)
end

#publisher(opts = {}) ⇒ Object



36
37
38
# File 'lib/hopper/channel/queue.rb', line 36

def publisher(opts = {})
  Hopper::Channel::Queue::Publisher.new(proxy, opts)
end