lib/message_driver/middleware/block_middleware.rb in message-driver-0.6.1 vs lib/message_driver/middleware/block_middleware.rb in message-driver-0.7.0

- old
+ new

@@ -3,10 +3,10 @@ class BlockMiddleware < Base attr_reader :on_publish_block, :on_consume_block def initialize(destination, opts) super(destination) - fail ArgumentError, 'you must provide at least one of :on_publish and :on_consume' \ + raise ArgumentError, 'you must provide at least one of :on_publish and :on_consume' \ unless opts.keys.any? { |k| [:on_publish, :on_consume].include? k } @on_publish_block = opts[:on_publish] @on_consume_block = opts[:on_consume] end