### Home Classes Methods

### In Files

- lib/amqp/integration/rails.rb

### Parent

Object

### Methods

- ::start

### Class/Module Index

Quicksearch

- AMQP
- AMQP::BitSet
- AMQP::BlankSlate
- AMQP::Broker
- AMQP::Channel
- AMQP::ChannelClosedError
- AMQP::Client
- AMQP::Consumer
- AMQP::Error
- AMQP::Exchange
- AMQP::Header
- AMQP::IncompatibleOptionsError
- AMQP::IntAllocator
- AMQP::Integration
- AMQP::Integration::Rails
- AMQP::Logger
- AMQP::PossibleAuthenticationFailureError
- AMQP::Queue
- AMQP::RPC
- AMQP::RPC::Client
- AMQP::RPC::Server
- AMQP::Session
- AMQP::TCPConnectionFailed
- AMQP::Utilities
- AMQP::Utilities::EventLoopHelper
- AMQP::Utilities::ServerType
- MQ
- MQ::Exchange
- MQ::Logger
- MQ::Queue
- EM
- Object

No matching classes.

# AMQP::Integration::Rails

### Public Class Methods

start(options_or_uri = {}, &block) click to toggle source

    # File lib/amqp/integration/rails.rb, line 7
    def self.start(options_or_uri = {}, &block)
      yaml     = YAML.load_file(File.join(::Rails.root, "config", "amqp.yml"))
      settings = yaml.fetch(::Rails.env, Hash.new).symbolize_keys

      arg      = if options_or_uri.is_a?(Hash)
                   settings.merge(options_or_uri)[:uri]
                 else
                   settings[:uri] || options_or_uri
                 end

      EventMachine.next_tick do
        AMQP.start(arg, &block)
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.