Class: Thincloud::Postmark::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/thincloud/postmark/configuration.rb

Overview

Public: Configuration options for the Thincloud::Postmark module

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_keyObject

Returns the value of attribute api_key.



17
18
19
# File 'lib/thincloud/postmark/configuration.rb', line 17

def api_key
  @api_key
end

#environmentsObject

Returns the value of attribute environments.



16
17
18
# File 'lib/thincloud/postmark/configuration.rb', line 16

def environments
  @environments
end

#interceptor_bccObject

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_ccObject

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_environmentsObject

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_toObject

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

#secureObject



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