Class: YandexApiDirect::Configuration
- Inherits:
-
Object
- Object
- YandexApiDirect::Configuration
- Defined in:
- lib/yandex_api_direct/configuration.rb
Constant Summary collapse
- BASE_URL_DEFAULT =
"https://api.direct.yandex.com/json/v5".freeze
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#app_id ⇒ Object
Returns the value of attribute app_id.
-
#base_url ⇒ Object
Returns the value of attribute base_url.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(options = {}) ⇒ Configuration
Returns a new instance of Configuration.
9 10 11 12 13 |
# File 'lib/yandex_api_direct/configuration.rb', line 9 def initialize( = {}) @app_id = [:app_id] @access_token = [:access_token] @base_url = .fetch(:base_url, YandexApiDirect::Configuration::BASE_URL_DEFAULT) end |
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
6 7 8 |
# File 'lib/yandex_api_direct/configuration.rb', line 6 def access_token @access_token end |
#app_id ⇒ Object
Returns the value of attribute app_id.
5 6 7 |
# File 'lib/yandex_api_direct/configuration.rb', line 5 def app_id @app_id end |
#base_url ⇒ Object
Returns the value of attribute base_url.
7 8 9 |
# File 'lib/yandex_api_direct/configuration.rb', line 7 def base_url @base_url end |