lib/vkontakte_api/configuration.rb in vkontakte_api-1.3.1 vs lib/vkontakte_api/configuration.rb in vkontakte_api-1.4
- old
+ new
@@ -1,10 +1,10 @@
require 'logger'
module VkontakteApi
# General configuration module.
- #
+ #
# @note `VkontakteApi::Configuration` extends `VkontakteApi` so these methods should be called from the latter.
module Configuration
# Available options.
OPTION_NAMES = [
:app_id,
@@ -15,11 +15,12 @@
:faraday_options,
:max_retries,
:logger,
:log_requests,
:log_errors,
- :log_responses
+ :log_responses,
+ :api_version
]
attr_accessor *OPTION_NAMES
alias_method :log_requests?, :log_requests
@@ -61,9 +62,10 @@
@max_retries = DEFAULT_MAX_RETRIES
@logger = ::Logger.new(STDOUT)
@log_requests = DEFAULT_LOGGER_OPTIONS[:requests]
@log_errors = DEFAULT_LOGGER_OPTIONS[:errors]
@log_responses = DEFAULT_LOGGER_OPTIONS[:responses]
+ @api_version = nil
end
# When this module is extended, set all configuration options to their default values.
def self.extended(base)
base.reset