Module: DMCourier::Configurable
- Included in:
- DMCourier, DeliveryMethod
- Defined in:
- lib/dm_courier/configurable.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#async ⇒ Object
Returns the value of attribute async.
-
#auto_html ⇒ Object
Returns the value of attribute auto_html.
-
#auto_text ⇒ Object
Returns the value of attribute auto_text.
-
#bcc_address ⇒ Object
Returns the value of attribute bcc_address.
-
#campaign_id ⇒ Object
Returns the value of attribute campaign_id.
-
#from ⇒ Object
Returns the value of attribute from.
-
#important ⇒ Object
Returns the value of attribute important.
-
#inline_css ⇒ Object
Returns the value of attribute inline_css.
-
#ip_pool ⇒ Object
Returns the value of attribute ip_pool.
-
#log_content ⇒ Object
Returns the value of attribute log_content.
-
#return_path_domain ⇒ Object
Returns the value of attribute return_path_domain.
-
#return_response ⇒ Object
Returns the value of attribute return_response.
-
#service_name ⇒ Object
Returns the value of attribute service_name.
-
#signing_domain ⇒ Object
Returns the value of attribute signing_domain.
-
#subaccount ⇒ Object
Returns the value of attribute subaccount.
-
#tags ⇒ Object
Returns the value of attribute tags.
-
#track_clicks ⇒ Object
Returns the value of attribute track_clicks.
-
#track_opens ⇒ Object
Returns the value of attribute track_opens.
-
#track_url_without_query_string ⇒ Object
Returns the value of attribute track_url_without_query_string.
-
#tracking_domain ⇒ Object
Returns the value of attribute tracking_domain.
Class Method Summary collapse
Instance Method Summary collapse
- #configure {|_self| ... } ⇒ Object
- #options ⇒ Object
- #reset! ⇒ Object (also: #setup)
- #same_options?(opts) ⇒ Boolean
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
5 6 7 |
# File 'lib/dm_courier/configurable.rb', line 5 def api_key @api_key end |
#async ⇒ Object
Returns the value of attribute async.
5 6 7 |
# File 'lib/dm_courier/configurable.rb', line 5 def async @async end |
#auto_html ⇒ Object
Returns the value of attribute auto_html.
5 6 7 |
# File 'lib/dm_courier/configurable.rb', line 5 def auto_html @auto_html end |
#auto_text ⇒ Object
Returns the value of attribute auto_text.
5 6 7 |
# File 'lib/dm_courier/configurable.rb', line 5 def auto_text @auto_text end |
#bcc_address ⇒ Object
Returns the value of attribute bcc_address.
5 6 7 |
# File 'lib/dm_courier/configurable.rb', line 5 def bcc_address @bcc_address end |
#campaign_id ⇒ Object
Returns the value of attribute campaign_id.
5 6 7 |
# File 'lib/dm_courier/configurable.rb', line 5 def campaign_id @campaign_id end |
#from ⇒ Object
Returns the value of attribute from.
5 6 7 |
# File 'lib/dm_courier/configurable.rb', line 5 def from @from end |
#important ⇒ Object
Returns the value of attribute important.
5 6 7 |
# File 'lib/dm_courier/configurable.rb', line 5 def important @important end |
#inline_css ⇒ Object
Returns the value of attribute inline_css.
5 6 7 |
# File 'lib/dm_courier/configurable.rb', line 5 def inline_css @inline_css end |
#ip_pool ⇒ Object
Returns the value of attribute ip_pool.
5 6 7 |
# File 'lib/dm_courier/configurable.rb', line 5 def ip_pool @ip_pool end |
#log_content ⇒ Object
Returns the value of attribute log_content.
5 6 7 |
# File 'lib/dm_courier/configurable.rb', line 5 def log_content @log_content end |
#return_path_domain ⇒ Object
Returns the value of attribute return_path_domain.
5 6 7 |
# File 'lib/dm_courier/configurable.rb', line 5 def return_path_domain @return_path_domain end |
#return_response ⇒ Object
Returns the value of attribute return_response.
5 6 7 |
# File 'lib/dm_courier/configurable.rb', line 5 def return_response @return_response end |
#service_name ⇒ Object
Returns the value of attribute service_name.
5 6 7 |
# File 'lib/dm_courier/configurable.rb', line 5 def service_name @service_name end |
#signing_domain ⇒ Object
Returns the value of attribute signing_domain.
5 6 7 |
# File 'lib/dm_courier/configurable.rb', line 5 def signing_domain @signing_domain end |
#subaccount ⇒ Object
Returns the value of attribute subaccount.
5 6 7 |
# File 'lib/dm_courier/configurable.rb', line 5 def subaccount @subaccount end |
#tags ⇒ Object
Returns the value of attribute tags.
5 6 7 |
# File 'lib/dm_courier/configurable.rb', line 5 def @tags end |
#track_clicks ⇒ Object
Returns the value of attribute track_clicks.
5 6 7 |
# File 'lib/dm_courier/configurable.rb', line 5 def track_clicks @track_clicks end |
#track_opens ⇒ Object
Returns the value of attribute track_opens.
5 6 7 |
# File 'lib/dm_courier/configurable.rb', line 5 def track_opens @track_opens end |
#track_url_without_query_string ⇒ Object
Returns the value of attribute track_url_without_query_string.
5 6 7 |
# File 'lib/dm_courier/configurable.rb', line 5 def track_url_without_query_string @track_url_without_query_string end |
#tracking_domain ⇒ Object
Returns the value of attribute tracking_domain.
5 6 7 |
# File 'lib/dm_courier/configurable.rb', line 5 def tracking_domain @tracking_domain end |
Class Method Details
.keys ⇒ Object
12 13 14 15 16 17 18 |
# 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 |
Instance Method Details
#configure {|_self| ... } ⇒ Object
21 22 23 |
# File 'lib/dm_courier/configurable.rb', line 21 def configure yield self end |
#options ⇒ Object
38 39 40 41 |
# File 'lib/dm_courier/configurable.rb', line 38 def Hash[DMCourier::Configurable .keys.map { |key| [key, instance_variable_get(:"@#{key}")] }] end |
#reset! ⇒ Object Also known as: setup
25 26 27 28 29 30 31 |
# File 'lib/dm_courier/configurable.rb', line 25 def reset! DMCourier::Configurable.keys.each do |key| instance_variable_set(:"@#{key}", DMCourier::Default.[key]) end self end |
#same_options?(opts) ⇒ Boolean
34 35 36 |
# File 'lib/dm_courier/configurable.rb', line 34 def (opts) opts.hash == .hash end |