module DMCourier::Configurable

Attributes

api_key[RW]
async[RW]
auto_html[RW]
auto_text[RW]
bcc_address[RW]
campaign_id[RW]
from[RW]
important[RW]
inline_css[RW]
ip_pool[RW]
log_content[RW]
return_path_domain[RW]
return_response[RW]
service_name[RW]
signing_domain[RW]
subaccount[RW]
tags[RW]
track_clicks[RW]
track_opens[RW]
track_url_without_query_string[RW]
tracking_domain[RW]

Public Class Methods

keys() click to toggle source
# File lib/dm_courier/configurable.rb, line 12
def keys
  @keys ||= [:api_key, :service_name, :async, :auto_html, :auto_text, :important,
             :inline_css, :track_clicks, :track_opens, :track_url_without_query_string,
             :log_content, :bcc_address, :return_path_domain, :signing_domain,
             :subaccount, :tracking_domain, :tags, :from, :return_response, :ip_pool,
             :campaign_id]
end

Public Instance Methods

configure() { |self| ... } click to toggle source
# File lib/dm_courier/configurable.rb, line 21
def configure
  yield self
end
options() click to toggle source
# File lib/dm_courier/configurable.rb, line 38
def options
  Hash[DMCourier::Configurable
       .keys.map { |key| [key, instance_variable_get(:"@#{key}")] }]
end
reset!() click to toggle source
# File lib/dm_courier/configurable.rb, line 25
def reset!
  DMCourier::Configurable.keys.each do |key|
    instance_variable_set(:"@#{key}", DMCourier::Default.options[key])
  end

  self
end
Also aliased as: setup
same_options?(opts) click to toggle source
# File lib/dm_courier/configurable.rb, line 34
def same_options?(opts)
  opts.hash == options.hash
end
setup()
Alias for: reset!