Class: SendGridActionMailerAdapter::Configuration
- Inherits:
-
Object
- Object
- SendGridActionMailerAdapter::Configuration
- Defined in:
- lib/sendgrid_actionmailer_adapter/configuration.rb
Constant Summary collapse
- DEFAULT_RETRY_MAX_COUNT =
0
- DEFAULT_RETRY_WAIT_SECONDS =
1.0
Class Attribute Summary collapse
-
.api_key ⇒ Object
Returns the value of attribute api_key.
-
.host ⇒ Object
Returns the value of attribute host.
-
.request_headers ⇒ Object
Returns the value of attribute request_headers.
-
.retry_max_count ⇒ Object
Returns the value of attribute retry_max_count.
-
.retry_wait_seconds ⇒ Object
Returns the value of attribute retry_wait_seconds.
-
.return_response ⇒ Object
Returns the value of attribute return_response.
-
.version ⇒ Object
Returns the value of attribute version.
Class Method Summary collapse
-
.configure {|_self| ... } ⇒ Object
Set your configuration with block.
-
.reset! ⇒ Object
Reset settings for test.
-
.settings ⇒ Hash
Returns configuration hash.
Class Attribute Details
.api_key ⇒ Object
Returns the value of attribute api_key.
9 10 11 |
# File 'lib/sendgrid_actionmailer_adapter/configuration.rb', line 9 def api_key @api_key end |
.host ⇒ Object
Returns the value of attribute host.
9 10 11 |
# File 'lib/sendgrid_actionmailer_adapter/configuration.rb', line 9 def host @host end |
.request_headers ⇒ Object
Returns the value of attribute request_headers.
9 10 11 |
# File 'lib/sendgrid_actionmailer_adapter/configuration.rb', line 9 def request_headers @request_headers end |
.retry_max_count ⇒ Object
Returns the value of attribute retry_max_count.
9 10 11 |
# File 'lib/sendgrid_actionmailer_adapter/configuration.rb', line 9 def retry_max_count @retry_max_count end |
.retry_wait_seconds ⇒ Object
Returns the value of attribute retry_wait_seconds.
9 10 11 |
# File 'lib/sendgrid_actionmailer_adapter/configuration.rb', line 9 def retry_wait_seconds @retry_wait_seconds end |
.return_response ⇒ Object
Returns the value of attribute return_response.
9 10 11 |
# File 'lib/sendgrid_actionmailer_adapter/configuration.rb', line 9 def return_response @return_response end |
.version ⇒ Object
Returns the value of attribute version.
9 10 11 |
# File 'lib/sendgrid_actionmailer_adapter/configuration.rb', line 9 def version @version end |
Class Method Details
.configure {|_self| ... } ⇒ Object
Set your configuration with block.
13 14 15 |
# File 'lib/sendgrid_actionmailer_adapter/configuration.rb', line 13 def configure yield(self) end |
.reset! ⇒ Object
Reset settings for test.
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/sendgrid_actionmailer_adapter/configuration.rb', line 37 def reset! self.api_key = nil self.host = nil self.request_headers = nil self.version = nil self.retry_max_count = nil self.retry_wait_seconds = nil self.return_response = nil @settings = nil end |
.settings ⇒ Hash
Returns configuration hash.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/sendgrid_actionmailer_adapter/configuration.rb', line 20 def settings @settings ||= { sendgrid: { api_key: api_key || '', host: host, request_headers: request_headers, version: version, }, retry: { max_count: retry_max_count || DEFAULT_RETRY_MAX_COUNT, wait_seconds: retry_wait_seconds || DEFAULT_RETRY_WAIT_SECONDS, }, return_response: return_response, }.freeze end |