lib/ears/consumer.rb in ears-0.1.0 vs lib/ears/consumer.rb in ears-0.2.0
- old
+ new
@@ -12,11 +12,11 @@
def self.middlewares
@middlewares ||= []
end
- def self.use(middleware)
- middlewares << middleware
+ def self.use(middleware, opts = {})
+ middlewares << middleware.new(opts)
end
def work(delivery_info, metadata, payload)
raise NotImplementedError
end