Class: Databox::Configuration
- Inherits:
-
Object
- Object
- Databox::Configuration
- Defined in:
- lib/databox/configuration.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#token ⇒ Object
Returns the value of attribute token.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 10 11 |
# File 'lib/databox/configuration.rb', line 7 def initialize @url ||= ENV["DATABOX_URL"] || 'https://app.databox.com' @key ||= ENV["DATABOX_KEY"] @token ||= ENV["DATABOX_TOKEN"] end |
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key.
2 3 4 |
# File 'lib/databox/configuration.rb', line 2 def key @key end |
#token ⇒ Object
Returns the value of attribute token.
2 3 4 |
# File 'lib/databox/configuration.rb', line 2 def token @token end |
#url ⇒ Object
Returns the value of attribute url.
2 3 4 |
# File 'lib/databox/configuration.rb', line 2 def url @url end |