Class: A55::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



5
6
7
8
# File 'lib/a55/configuration.rb', line 5

def initialize
  @token = nil
  @env = nil
end

Instance Attribute Details

#account_idObject

Returns the value of attribute account_id.



3
4
5
# File 'lib/a55/configuration.rb', line 3

def 
  @account_id
end

#api_tokenObject

Returns the value of attribute api_token.



3
4
5
# File 'lib/a55/configuration.rb', line 3

def api_token
  @api_token
end

#api_urlObject (readonly)

Returns the value of attribute api_url.



4
5
6
# File 'lib/a55/configuration.rb', line 4

def api_url
  @api_url
end

#envObject

Returns the value of attribute env.



3
4
5
# File 'lib/a55/configuration.rb', line 3

def env
  @env
end

Instance Method Details

#auth_apiObject



22
23
24
25
26
27
28
# File 'lib/a55/configuration.rb', line 22

def auth_api
  if production?
    'https://auth-api.a55.tech/api/auth/signin'
  else
    'https://auth-api-hmg.a55.tech/api/auth/signin'
  end
end

#production?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/a55/configuration.rb', line 18

def production?
  ENV['RAILS_ENV'] == 'production' || self.env == 'production'
end