Class: TowerdataEmail::Config
- Inherits:
-
Object
- Object
- TowerdataEmail::Config
- Defined in:
- lib/towerdata_email.rb
Instance Attribute Summary collapse
-
#auto_accept_corrections ⇒ Object
Returns the value of attribute auto_accept_corrections.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#only_validate_on_change ⇒ Object
Returns the value of attribute only_validate_on_change.
-
#show_corrections ⇒ Object
Returns the value of attribute show_corrections.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#token ⇒ Object
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(token = nil, timeout = 5, headers = { 'Content-Type' => 'application/json' }) ⇒ Config
constructor
TowerdataEmail::Config must provide a valid API toke (set an environment variable to your credentials) token = ENV Arguments: token: (String) headers: (Hash).
Constructor Details
#initialize(token = nil, timeout = 5, headers = { 'Content-Type' => 'application/json' }) ⇒ Config
TowerdataEmail::Config must provide a valid API toke (set an environment variable to your credentials) token = ENV Arguments:
token: (String)
headers: (Hash)
156 157 158 159 160 161 162 163 |
# File 'lib/towerdata_email.rb', line 156 def initialize(token = nil, timeout = 5, headers = { 'Content-Type' => 'application/json' } ) @token = token @headers = headers @show_corrections = true @auto_accept_corrections = false @only_validate_on_change = false @timeout = timeout end |
Instance Attribute Details
#auto_accept_corrections ⇒ Object
Returns the value of attribute auto_accept_corrections.
149 150 151 |
# File 'lib/towerdata_email.rb', line 149 def auto_accept_corrections @auto_accept_corrections end |
#headers ⇒ Object
Returns the value of attribute headers.
149 150 151 |
# File 'lib/towerdata_email.rb', line 149 def headers @headers end |
#only_validate_on_change ⇒ Object
Returns the value of attribute only_validate_on_change.
149 150 151 |
# File 'lib/towerdata_email.rb', line 149 def only_validate_on_change @only_validate_on_change end |
#show_corrections ⇒ Object
Returns the value of attribute show_corrections.
149 150 151 |
# File 'lib/towerdata_email.rb', line 149 def show_corrections @show_corrections end |
#timeout ⇒ Object
Returns the value of attribute timeout.
149 150 151 |
# File 'lib/towerdata_email.rb', line 149 def timeout @timeout end |
#token ⇒ Object
Returns the value of attribute token.
149 150 151 |
# File 'lib/towerdata_email.rb', line 149 def token @token end |