lib/cotton_tail/dsl/queue.rb in cotton-tail-0.5.0 vs lib/cotton_tail/dsl/queue.rb in cotton-tail-0.6.0

- old
+ new

@@ -8,23 +8,23 @@ @name = name @queue = queue @context = context end - def handle(key, handler = nil, &block) - bind(key) - @context.handle(key, handler, &block) + def handle(pattern, handler = nil, &block) + bind pattern + @context.handle(pattern, handler, &block) end def topic(routing_prefix, &block) topic = Topic.new(routing_prefix, self) topic.instance_eval(&block) end - def bind(key) + def bind(pattern) return unless @queue.respond_to?(:bind) - @queue.bind key + @queue.bind pattern end end end end