Class: Incognia::Configuration
- Inherits:
-
Object
- Object
- Incognia::Configuration
- Includes:
- Singleton
- Defined in:
- lib/incognia_api/configuration.rb
Instance Attribute Summary collapse
-
#client_id ⇒ Object
Returns the value of attribute client_id.
-
#client_secret ⇒ Object
Returns the value of attribute client_secret.
-
#host ⇒ Object
Returns the value of attribute host.
-
#keep_alive ⇒ Object
Returns the value of attribute keep_alive.
-
#max_connections ⇒ Object
Returns the value of attribute max_connections.
Instance Method Summary collapse
Instance Attribute Details
#client_id ⇒ Object
Returns the value of attribute client_id.
7 8 9 |
# File 'lib/incognia_api/configuration.rb', line 7 def client_id @client_id end |
#client_secret ⇒ Object
Returns the value of attribute client_secret.
7 8 9 |
# File 'lib/incognia_api/configuration.rb', line 7 def client_secret @client_secret end |
#host ⇒ Object
Returns the value of attribute host.
7 8 9 |
# File 'lib/incognia_api/configuration.rb', line 7 def host @host end |
#keep_alive ⇒ Object
Returns the value of attribute keep_alive.
7 8 9 |
# File 'lib/incognia_api/configuration.rb', line 7 def keep_alive @keep_alive end |
#max_connections ⇒ Object
Returns the value of attribute max_connections.
7 8 9 |
# File 'lib/incognia_api/configuration.rb', line 7 def max_connections @max_connections end |
Instance Method Details
#configure(client_id:, client_secret:, host: nil, keep_alive: false, max_connections: nil) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/incognia_api/configuration.rb', line 9 def configure(client_id:, client_secret:, host: nil, keep_alive: false, max_connections: nil) validate_connection_settings!(keep_alive: keep_alive, max_connections: max_connections) @client_id = client_id @client_secret = client_secret @host = host || 'https://api.incognia.com/api' @keep_alive = keep_alive @max_connections = max_connections self end |