Sha256: 6b56006ffa5fc56601efc19a0958610d022a659a98ac2579126227e65c0b8d42

Contents?: true

Size: 642 Bytes

Versions: 1

Compression:

Stored size: 642 Bytes

Contents

# encoding: utf-8

module HotBunnies
  module Channel
    def queue(name, options={})
      Queue.new(self, name, options)
    end
    
    def exchange(name, options={})
      Exchange.new(self, name, options)
    end
    
    def qos(options={})
      if options.size == 1 && options[:prefetch_count]
      then basic_qos(options[:prefetch_count])
      else basic_qos(options.fetch(:prefetch_size, 0), options.fetch(:prefetch_count, 0), options.fetch(:global, false))
      end
    end
    
    def prefetch=(n)
      qos(:prefetch_count => n)
    end
    
    def on_return(&block)
      self.set_return_listener(block)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hot_bunnies-1.1.3-java lib/hot_bunnies/channel.rb