lib/kanina/subscription.rb in kanina-0.6.0 vs lib/kanina/subscription.rb in kanina-0.6.1
- old
+ new
@@ -20,10 +20,10 @@
include Kanina::Logger
# Helper method to return the channel that Kanina::Server is talking on.
# @return [Bunny::Channel]
def channel
- Kanina::Server.channel
+ Kanina::Server.channel or fail 'Kanina::Server.channel is not open'
end
# Begins subscribing to the specified queue (or binds to an exchange and
# sets up an anonymous queue). The block is called for every message
# received, and data is passed in as a plain Ruby hash.