module MandrillQueue::MandrillApi

Public Instance Methods

configuration() click to toggle source
# File lib/mandrill_queue/mandrill_api.rb, line 7
def configuration
        MandrillQueue.configuration
end
mandrill() click to toggle source
# File lib/mandrill_queue/mandrill_api.rb, line 11
                def mandrill
                        @_api ||= begin
                                if configuration.api_key.nil?
                                        raise MandrillQueue::ConfigurationError, <<-ERR
                                        An Api key has not been configured. Please configure on as follows in an initializer:
                                        MandrillQueue.configure do { |c| c.api_key = 'xxxxxxxxxxxxxx' }
                                        ERR
                                end

                                Mandrill::API.new(configuration.api_key)
                        end
                end