Module: NoNotifierNeeded::Config

Included in:
NoNotifierNeeded
Defined in:
lib/no_notifier_needed/config.rb

Constant Summary collapse

VALID_OPTIONS_KEYS =
[
  #Defaults
  :from_email,
  :from_name,
  :bcc,
  :reply_to,

  #Url Options
  :host,
  :controller,
  :action,
].freeze
SECURE_OPTIONS_KEYS =
[
  #mandrill options
  :mandrill_user_name,
  :mandrill_password,
  :mandrill_port,

  #Gmail options
  :gmail_user_name,
  :gmail_password,
  :gmail_domain,

  #current User options
  :current_user_model,
  :current_user_id_method,
].freeze

Instance Method Summary collapse

Instance Method Details

#optionsObject

Create a hash of options and their values



38
39
40
41
42
# File 'lib/no_notifier_needed/config.rb', line 38

def options
  (SECURE_OPTIONS_KEYS + VALID_OPTIONS_KEYS).inject({}) do |option, key|
    option.merge!(key => send(key))
  end
end