Bunny is a RabbitMQ client that focuses on ease of use. @see rubybunny.info
backwards compatibility
backwards compatibility @private
AMQP protocol version Bunny implements
@private
Unifies Ruby standard library’s Timeout (which is not accurate on Ruby 1.8) and SystemTimer (the gem)
Backwards compatibility @private
@return [String] Version of the library
Instantiates a new connection. The actual connection network connection is started with {Bunny::Session#start}
@return [Bunny::Session] @see Bunny::Session#start @see rubybunny.info/articles/getting_started.html @see rubybunny.info/articles/connecting.html @api public
# File lib/bunny.rb, line 58 def self.new(connection_string_or_opts = {}, opts = {}, &block) if connection_string_or_opts.respond_to?(:keys) && opts.empty? opts = connection_string_or_opts end conn = Session.new(connection_string_or_opts, opts) @default_connection ||= conn conn end
@return [String] AMQP protocol version Bunny implements
# File lib/bunny.rb, line 46 def self.protocol_version AMQ::Protocol::PROTOCOL_VERSION end
# File lib/bunny.rb, line 70 def self.run(connection_string_or_opts = {}, opts = {}, &block) raise ArgumentError, 'Bunny#run requires a block' unless block client = Session.new(connection_string_or_opts, opts) begin client.start block.call(client) ensure client.stop end # backwards compatibility :run_ok end
@return [String] Bunny version
# File lib/bunny.rb, line 41 def self.version VERSION end
Generated with the Darkfish Rdoc Generator 2.