Class: BetterStack::Configuration
- Inherits:
-
Object
- Object
- BetterStack::Configuration
- Defined in:
- lib/betterstack/configuration.rb
Instance Attribute Summary collapse
-
#api_token ⇒ Object
Returns the value of attribute api_token.
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#retries ⇒ Object
Returns the value of attribute retries.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #valid? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
5 6 7 8 9 |
# File 'lib/betterstack/configuration.rb', line 5 def initialize @base_url = "https://uptime.betterstack.com/api/v2" @timeout = 30 @retries = 3 end |
Instance Attribute Details
#api_token ⇒ Object
Returns the value of attribute api_token.
3 4 5 |
# File 'lib/betterstack/configuration.rb', line 3 def api_token @api_token end |
#base_url ⇒ Object
Returns the value of attribute base_url.
3 4 5 |
# File 'lib/betterstack/configuration.rb', line 3 def base_url @base_url end |
#retries ⇒ Object
Returns the value of attribute retries.
3 4 5 |
# File 'lib/betterstack/configuration.rb', line 3 def retries @retries end |
#timeout ⇒ Object
Returns the value of attribute timeout.
3 4 5 |
# File 'lib/betterstack/configuration.rb', line 3 def timeout @timeout end |
Instance Method Details
#valid? ⇒ Boolean
11 12 13 |
# File 'lib/betterstack/configuration.rb', line 11 def valid? !api_token.nil? && !api_token.empty? end |