Sha256: 2a0792beb837e0eccceab2264703af7f5cf02d8bbe8299c3155c2ee3274c97a5
Contents?: true
Size: 451 Bytes
Versions: 22
Compression:
Stored size: 451 Bytes
Contents
module Fluffle module Connectable def self.included(klass) klass.class_eval do attr_reader :connection end end def connect(*args) self.stop if self.connected? @connection = if args.first.is_a? Bunny::Session args.first else Bunny.new *args end @connection.start end def connected? @connection && @connection.connected? end end end
Version data entries
22 entries across 22 versions & 1 rubygems