Class: KinopoiskUnofficialApi::Configuration
- Inherits:
-
Object
- Object
- KinopoiskUnofficialApi::Configuration
- Defined in:
- lib/kinopoisk_unofficial_api/configuration.rb
Instance Attribute Summary collapse
-
#adapter ⇒ Object
Returns the value of attribute adapter.
-
#connection_open_timeout ⇒ Object
Returns the value of attribute connection_open_timeout.
-
#connection_timeout ⇒ Object
Returns the value of attribute connection_timeout.
-
#countries ⇒ Object
Returns the value of attribute countries.
-
#genres ⇒ Object
Returns the value of attribute genres.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 10 11 12 13 |
# File 'lib/kinopoisk_unofficial_api/configuration.rb', line 7 def initialize @adapter = Faraday.default_adapter @connection_open_timeout = 20 @connection_timeout = 20 @genres = JSON.parse(File.read("#{__dir__}/../../data/genres.json"), symbolize_names: true) @countries = JSON.parse(File.read("#{__dir__}/../../data/countries.json"), symbolize_names: true) end |
Instance Attribute Details
#adapter ⇒ Object
Returns the value of attribute adapter.
5 6 7 |
# File 'lib/kinopoisk_unofficial_api/configuration.rb', line 5 def adapter @adapter end |
#connection_open_timeout ⇒ Object
Returns the value of attribute connection_open_timeout.
5 6 7 |
# File 'lib/kinopoisk_unofficial_api/configuration.rb', line 5 def connection_open_timeout @connection_open_timeout end |
#connection_timeout ⇒ Object
Returns the value of attribute connection_timeout.
5 6 7 |
# File 'lib/kinopoisk_unofficial_api/configuration.rb', line 5 def connection_timeout @connection_timeout end |
#countries ⇒ Object
Returns the value of attribute countries.
5 6 7 |
# File 'lib/kinopoisk_unofficial_api/configuration.rb', line 5 def countries @countries end |
#genres ⇒ Object
Returns the value of attribute genres.
5 6 7 |
# File 'lib/kinopoisk_unofficial_api/configuration.rb', line 5 def genres @genres end |