Class: Config
- Inherits:
-
Object
- Object
- Config
- Defined in:
- lib/wattics-api-client/config.rb
Constant Summary collapse
- PRODUCTION =
'https://web-collector.wattics.com/measurements/v2/unifiedjson/'.freeze
- DEVELOPMENT =
'https://dev-web-collector.wattics.com/measurements/v2/unifiedjson/'.freeze
- TEST =
'http://localhost:8080/measurements/v2/unifiedjson/'.freeze
Instance Attribute Summary collapse
-
#environment(environment) ⇒ Object
readonly
Returns the value of attribute environment.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(environment, username, password) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(environment, username, password) ⇒ Config
Returns a new instance of Config.
6 7 8 9 10 11 |
# File 'lib/wattics-api-client/config.rb', line 6 def initialize(environment, username, password) @environment = environment @uri = environment(environment) @username = username @password = password end |
Instance Attribute Details
#environment(environment) ⇒ Object (readonly)
Returns the value of attribute environment.
2 3 4 |
# File 'lib/wattics-api-client/config.rb', line 2 def environment @environment end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
2 3 4 |
# File 'lib/wattics-api-client/config.rb', line 2 def password @password end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
2 3 4 |
# File 'lib/wattics-api-client/config.rb', line 2 def uri @uri end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
2 3 4 |
# File 'lib/wattics-api-client/config.rb', line 2 def username @username end |