Class: Oopsie::Configuration
- Inherits:
-
Object
- Object
- Oopsie::Configuration
- Defined in:
- lib/oopsie/configuration.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
-
#ignored_exceptions ⇒ Object
Returns the value of attribute ignored_exceptions.
-
#on_error ⇒ Object
Returns the value of attribute on_error.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #validate! ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
10 11 12 |
# File 'lib/oopsie/configuration.rb', line 10 def initialize @ignored_exceptions = [] end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
7 8 9 |
# File 'lib/oopsie/configuration.rb', line 7 def api_key @api_key end |
#endpoint ⇒ Object
Returns the value of attribute endpoint.
8 9 10 |
# File 'lib/oopsie/configuration.rb', line 8 def endpoint @endpoint end |
#ignored_exceptions ⇒ Object
Returns the value of attribute ignored_exceptions.
7 8 9 |
# File 'lib/oopsie/configuration.rb', line 7 def ignored_exceptions @ignored_exceptions end |
#on_error ⇒ Object
Returns the value of attribute on_error.
7 8 9 |
# File 'lib/oopsie/configuration.rb', line 7 def on_error @on_error end |
Instance Method Details
#validate! ⇒ Object
18 19 20 21 |
# File 'lib/oopsie/configuration.rb', line 18 def validate! raise ConfigurationError, 'api_key is required' if api_key.nil? || api_key.empty? raise ConfigurationError, 'endpoint is required' if endpoint.nil? || endpoint.empty? end |