Class: Emailverify::Configuration
- Inherits:
-
Object
- Object
- Emailverify::Configuration
- Defined in:
- lib/emailverify/configuration.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#base_url ⇒ Object
readonly
Returns the value of attribute base_url.
-
#endpoints ⇒ Object
Returns the value of attribute endpoints.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
- #apikey ⇒ Object
-
#apikey=(val) ⇒ Object
ZeroBounce-style alias: allow ‘config.apikey = ’key’‘ to set api_key.
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/emailverify/configuration.rb', line 8 def initialize @api_key = nil # Base URL is fixed to the official EmailVerify.io host @base_url = "https://app.emailverify.io" @timeout = 10 @logger = nil # endpoints can be overridden by the user to match their API paths @endpoints = { # EmailVerify.io single email validation endpoint (v1) validate: "/api/v1/validate", # EmailVerify.io check account balance endpoint (v2) check_balance: "/api/v2/check-account-balance" } end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
5 6 7 |
# File 'lib/emailverify/configuration.rb', line 5 def api_key @api_key end |
#base_url ⇒ Object (readonly)
Returns the value of attribute base_url.
6 7 8 |
# File 'lib/emailverify/configuration.rb', line 6 def base_url @base_url end |
#endpoints ⇒ Object
Returns the value of attribute endpoints.
5 6 7 |
# File 'lib/emailverify/configuration.rb', line 5 def endpoints @endpoints end |
#logger ⇒ Object
Returns the value of attribute logger.
5 6 7 |
# File 'lib/emailverify/configuration.rb', line 5 def logger @logger end |
#timeout ⇒ Object
Returns the value of attribute timeout.
5 6 7 |
# File 'lib/emailverify/configuration.rb', line 5 def timeout @timeout end |
Instance Method Details
#apikey ⇒ Object
28 29 30 |
# File 'lib/emailverify/configuration.rb', line 28 def apikey api_key end |
#apikey=(val) ⇒ Object
ZeroBounce-style alias: allow ‘config.apikey = ’key’‘ to set api_key
24 25 26 |
# File 'lib/emailverify/configuration.rb', line 24 def apikey=(val) self.api_key = val end |