Class: Thincloud::Postmark::Configuration
- Inherits:
-
Object
- Object
- Thincloud::Postmark::Configuration
- Defined in:
- lib/thincloud/postmark/configuration.rb
Overview
Public: Configuration options for the Thincloud::Postmark module
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#environments ⇒ Object
Returns the value of attribute environments.
-
#interceptor_bcc ⇒ Object
Returns the value of attribute interceptor_bcc.
-
#interceptor_cc ⇒ Object
Returns the value of attribute interceptor_cc.
-
#interceptor_environments ⇒ Object
Returns the value of attribute interceptor_environments.
-
#interceptor_to ⇒ Object
Returns the value of attribute interceptor_to.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #secure ⇒ Object
- #secure=(s) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/thincloud/postmark/configuration.rb', line 23 def initialize @api_key ||= ENV.fetch("POSTMARK_API_KEY", "POSTMARK_API_TEST") @interceptor_to ||= ENV["THINCLOUD_INTERCEPTOR_TO"] @interceptor_cc ||= ENV["THINCLOUD_INTERCEPTOR_CC"] @interceptor_bcc ||= ENV["THINCLOUD_INTERCEPTOR_BCC"] @environments = [] @interceptor_environments = [] self.secure = ENV.fetch("POSTMARK_SECURE", true) end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
17 18 19 |
# File 'lib/thincloud/postmark/configuration.rb', line 17 def api_key @api_key end |
#environments ⇒ Object
Returns the value of attribute environments.
16 17 18 |
# File 'lib/thincloud/postmark/configuration.rb', line 16 def environments @environments end |
#interceptor_bcc ⇒ Object
Returns the value of attribute interceptor_bcc.
20 21 22 |
# File 'lib/thincloud/postmark/configuration.rb', line 20 def interceptor_bcc @interceptor_bcc end |
#interceptor_cc ⇒ Object
Returns the value of attribute interceptor_cc.
19 20 21 |
# File 'lib/thincloud/postmark/configuration.rb', line 19 def interceptor_cc @interceptor_cc end |
#interceptor_environments ⇒ Object
Returns the value of attribute interceptor_environments.
21 22 23 |
# File 'lib/thincloud/postmark/configuration.rb', line 21 def interceptor_environments @interceptor_environments end |
#interceptor_to ⇒ Object
Returns the value of attribute interceptor_to.
18 19 20 |
# File 'lib/thincloud/postmark/configuration.rb', line 18 def interceptor_to @interceptor_to end |
Instance Method Details
#secure ⇒ Object
40 41 42 |
# File 'lib/thincloud/postmark/configuration.rb', line 40 def secure ::Postmark.secure end |
#secure=(s) ⇒ Object
36 37 38 |
# File 'lib/thincloud/postmark/configuration.rb', line 36 def secure=(s) ::Postmark.secure = s end |