module Mandrill::Rails::WebHookProcessor::ClassMethods

Public Instance Methods

authenticate_with_mandrill_keys!(*keys) click to toggle source

Gets/sets the current Mandrill WebHook Authentication key(s). Returns the current WebHook key(s) as an Array if called with no parameters. If called with parameters, add the params to the WebHook key array. If called with nil as the parameters, clears the WebHook key array.

# File lib/mandrill-rails/web_hook_processor.rb, line 46
def authenticate_with_mandrill_keys!(*keys)
  @mandrill_webhook_keys ||= []
  if keys.present?
    if keys.compact.present?
      @mandrill_webhook_keys.concat(keys.flatten)
    else
      @mandrill_webhook_keys = []
    end
  end
  @mandrill_webhook_keys
end
ignore_unhandled_events!() click to toggle source
# File lib/mandrill-rails/web_hook_processor.rb, line 74
def ignore_unhandled_events!
  on_unhandled_mandrill_events! :ignore
end
mandrill_webhook_keys() click to toggle source

Gets the current Mandrill WebHook Authentication key(s).

# File lib/mandrill-rails/web_hook_processor.rb, line 59
def mandrill_webhook_keys
  authenticate_with_mandrill_keys!
end
mandrill_webhook_keys=(keys) click to toggle source

Command: directly assigns the WebHook key array to keys.

# File lib/mandrill-rails/web_hook_processor.rb, line 64
def mandrill_webhook_keys=(keys)
  @mandrill_webhook_keys = Array(keys)
end
on_unhandled_mandrill_events!(new_setting=nil) click to toggle source
# File lib/mandrill-rails/web_hook_processor.rb, line 68
def on_unhandled_mandrill_events!(new_setting=nil)
  @on_unhandled_mandrill_events = new_setting unless new_setting.nil?
  @on_unhandled_mandrill_events ||= :log
  @on_unhandled_mandrill_events
end
unhandled_events_raise_exceptions!() click to toggle source
# File lib/mandrill-rails/web_hook_processor.rb, line 78
def unhandled_events_raise_exceptions!
  on_unhandled_mandrill_events! :raise_exception
end