Module: OverwatchApi::Configuration
- Included in:
- OverwatchApi
- Defined in:
- lib/overwatch_api/configuration.rb
Constant Summary collapse
- DEFAULT_ENDPOINT =
""
- DEFAULT_API_KEY =
ENV["OVERWATCH_API_KEY"]
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
4 5 6 |
# File 'lib/overwatch_api/configuration.rb', line 4 def api_key @api_key end |
#endpoint ⇒ Object
Returns the value of attribute endpoint.
3 4 5 |
# File 'lib/overwatch_api/configuration.rb', line 3 def endpoint @endpoint end |
Class Method Details
.extended(base) ⇒ Object
9 10 11 |
# File 'lib/overwatch_api/configuration.rb', line 9 def self.extended(base) base.reset end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
18 19 20 |
# File 'lib/overwatch_api/configuration.rb', line 18 def configure yield self end |
#reset ⇒ Object
13 14 15 16 |
# File 'lib/overwatch_api/configuration.rb', line 13 def reset self.endpoint = DEFAULT_ENDPOINT self.api_key = DEFAULT_API_KEY end |