module Hat module Patterns module Topic module ClassMethods def listen(key=nil) self.bind_options[:routing_key] = key end end private def exchange @channel.topic('hat.topic') end def self.included(base) base.extend ClassMethods end end end end