# File lib/bunny.rb, line 47 def self.run(connection_string_or_opts = {}, opts = {}, &block) raise ArgumentError, 'Bunny#run requires a block' unless block # Set up Bunny client = setup(connection_string_or_opts, opts) begin client.start block.call(client) ensure client.stop end # Return success :run_ok end