Class: Driftrock::Service::Config
- Inherits:
-
Struct
- Object
- Struct
- Driftrock::Service::Config
- Defined in:
- lib/driftrock-service/config.rb
Instance Attribute Summary collapse
-
#api_token ⇒ Object
Returns the value of attribute api_token.
-
#app_id ⇒ Object
Returns the value of attribute app_id.
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#salt ⇒ Object
Returns the value of attribute salt.
-
#unauthorised_path ⇒ Object
Returns the value of attribute unauthorised_path.
Class Method Summary collapse
- .api_token ⇒ Object
- .app_id ⇒ Object
- .base_url ⇒ Object
- .init {|config| ... } ⇒ Object
- .salt ⇒ Object
- .unauthorised_path ⇒ Object
Instance Attribute Details
#api_token ⇒ Object
Returns the value of attribute api_token
3 4 5 |
# File 'lib/driftrock-service/config.rb', line 3 def api_token @api_token end |
#app_id ⇒ Object
Returns the value of attribute app_id
3 4 5 |
# File 'lib/driftrock-service/config.rb', line 3 def app_id @app_id end |
#base_url ⇒ Object
Returns the value of attribute base_url
3 4 5 |
# File 'lib/driftrock-service/config.rb', line 3 def base_url @base_url end |
#salt ⇒ Object
Returns the value of attribute salt
3 4 5 |
# File 'lib/driftrock-service/config.rb', line 3 def salt @salt end |
#unauthorised_path ⇒ Object
Returns the value of attribute unauthorised_path
3 4 5 |
# File 'lib/driftrock-service/config.rb', line 3 def @unauthorised_path end |
Class Method Details
.api_token ⇒ Object
15 16 17 |
# File 'lib/driftrock-service/config.rb', line 15 def self.api_token @config.api_token end |
.app_id ⇒ Object
23 24 25 |
# File 'lib/driftrock-service/config.rb', line 23 def self.app_id @config.app_id end |
.base_url ⇒ Object
7 8 9 |
# File 'lib/driftrock-service/config.rb', line 7 def self.base_url @config.base_url end |
.init {|config| ... } ⇒ Object
27 28 29 30 31 32 |
# File 'lib/driftrock-service/config.rb', line 27 def self.init config = new yield(config) config.base_url.gsub(/\/$/, "") @config = config end |
.salt ⇒ Object
11 12 13 |
# File 'lib/driftrock-service/config.rb', line 11 def self.salt @config.salt end |
.unauthorised_path ⇒ Object
19 20 21 |
# File 'lib/driftrock-service/config.rb', line 19 def self. @config. end |