Class: Incognia::Configuration

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/incognia_api/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#client_idObject

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_secretObject

Returns the value of attribute client_secret.



7
8
9
# File 'lib/incognia_api/configuration.rb', line 7

def client_secret
  @client_secret
end

#hostObject

Returns the value of attribute host.



7
8
9
# File 'lib/incognia_api/configuration.rb', line 7

def host
  @host
end

Instance Method Details

#configure(client_id:, client_secret:, host: nil) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/incognia_api/configuration.rb', line 9

def configure(client_id:, client_secret:, host: nil)
  @client_id = client_id
  @client_secret = client_secret
  @host = host || 'https://api.incognia.com/api'

  self
end