Module: MandrillQueue::MandrillApi
- Included in:
- Worker
- Defined in:
- lib/mandrill_queue/mandrill_api.rb
Instance Method Summary collapse
Instance Method Details
#configuration ⇒ Object
7 8 9 |
# File 'lib/mandrill_queue/mandrill_api.rb', line 7 def configuration MandrillQueue.configuration end |
#mandrill ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# 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 |