Class: Mode::Sdk::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/mode/sdk/configuration.rb

Overview

Constant Summary collapse

DEFAULT_HOST =

The default host to use for Mode API requests

'https://modeanalytics.com'

Instance Attribute Summary collapse

Instance Attribute Details

#hostString

Mode API host

Returns:

  • (String)

    the host


44
45
46
# File 'lib/mode/sdk/configuration.rb', line 44

def host
  @host || ENV['MODE_HOST'] || DEFAULT_HOST
end

#secretString

Mode API secret

Returns:

  • (String)

    the secret


36
37
38
# File 'lib/mode/sdk/configuration.rb', line 36

def secret
  @secret || ENV['MODE_SECRET']
end

#tokenString

Mode API token

Returns:

  • (String)

    the token


28
29
30
# File 'lib/mode/sdk/configuration.rb', line 28

def token
  @token || ENV['MODE_TOKEN']
end