Class: A55::Configuration
- Inherits:
-
Object
- Object
- A55::Configuration
- Defined in:
- lib/a55/configuration.rb
Instance Attribute Summary collapse
-
#account_id ⇒ Object
Returns the value of attribute account_id.
-
#api_token ⇒ Object
Returns the value of attribute api_token.
-
#api_url ⇒ Object
readonly
Returns the value of attribute api_url.
-
#env ⇒ Object
Returns the value of attribute env.
Instance Method Summary collapse
- #auth_api ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #production? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
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_id ⇒ Object
Returns the value of attribute account_id.
3 4 5 |
# File 'lib/a55/configuration.rb', line 3 def account_id @account_id end |
#api_token ⇒ Object
Returns the value of attribute api_token.
3 4 5 |
# File 'lib/a55/configuration.rb', line 3 def api_token @api_token end |
#api_url ⇒ Object (readonly)
Returns the value of attribute api_url.
4 5 6 |
# File 'lib/a55/configuration.rb', line 4 def api_url @api_url end |
#env ⇒ Object
Returns the value of attribute env.
3 4 5 |
# File 'lib/a55/configuration.rb', line 3 def env @env end |
Instance Method Details
#auth_api ⇒ Object
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
18 19 20 |
# File 'lib/a55/configuration.rb', line 18 def production? ENV['RAILS_ENV'] == 'production' || self.env == 'production' end |