Class: Notisend::Configuration
- Inherits:
-
Object
- Object
- Notisend::Configuration
- Defined in:
- lib/notisend/configuration.rb
Overview
Holds client settings; every option can be overridden per Client instance
Constant Summary collapse
- DEFAULT_BASE_URL =
'https://api.notisend.ru/v1'
Instance Attribute Summary collapse
-
#api_token ⇒ Object
Returns the value of attribute api_token.
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#ca_bundle_file ⇒ Object
Returns the value of attribute ca_bundle_file.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#verify_ssl ⇒ Object
Returns the value of attribute verify_ssl.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
10 11 12 13 14 15 16 17 18 |
# File 'lib/notisend/configuration.rb', line 10 def initialize @api_token = ENV.fetch('NOTISEND_API_TOKEN', nil) @base_url = DEFAULT_BASE_URL @open_timeout = 10 @timeout = 30 @verify_ssl = ENV.fetch('NOTISEND_VERIFY_SSL', 'true') != 'false' @ca_bundle_file = ENV.fetch('NOTISEND_CA_BUNDLE_FILE', nil) @logger = nil end |
Instance Attribute Details
#api_token ⇒ Object
Returns the value of attribute api_token.
8 9 10 |
# File 'lib/notisend/configuration.rb', line 8 def api_token @api_token end |
#base_url ⇒ Object
Returns the value of attribute base_url.
8 9 10 |
# File 'lib/notisend/configuration.rb', line 8 def base_url @base_url end |
#ca_bundle_file ⇒ Object
Returns the value of attribute ca_bundle_file.
8 9 10 |
# File 'lib/notisend/configuration.rb', line 8 def ca_bundle_file @ca_bundle_file end |
#logger ⇒ Object
Returns the value of attribute logger.
8 9 10 |
# File 'lib/notisend/configuration.rb', line 8 def logger @logger end |
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
8 9 10 |
# File 'lib/notisend/configuration.rb', line 8 def open_timeout @open_timeout end |
#timeout ⇒ Object
Returns the value of attribute timeout.
8 9 10 |
# File 'lib/notisend/configuration.rb', line 8 def timeout @timeout end |
#verify_ssl ⇒ Object
Returns the value of attribute verify_ssl.
8 9 10 |
# File 'lib/notisend/configuration.rb', line 8 def verify_ssl @verify_ssl end |