class Queight::ChannelWrapper

Adds memoization of exchanges etc.

Public Class Methods

new(channel) click to toggle source
Calls superclass method
# File lib/queight/channel_wrapper.rb, line 4
def initialize(channel)
  super(channel)
  reset_cache!
end

Public Instance Methods

exchange(*args) click to toggle source
Calls superclass method
# File lib/queight/channel_wrapper.rb, line 13
def exchange(*args)
  @exchange_cache[args] ||= super
end
reset_cache!() click to toggle source
# File lib/queight/channel_wrapper.rb, line 9
def reset_cache!
  @exchange_cache = {}
end