Class: Oopsie::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/oopsie/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



7
8
9
# File 'lib/oopsie/configuration.rb', line 7

def api_key
  @api_key
end

#endpointObject

Returns the value of attribute endpoint.



8
9
10
# File 'lib/oopsie/configuration.rb', line 8

def endpoint
  @endpoint
end

#on_errorObject

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

Raises:



14
15
16
17
# File 'lib/oopsie/configuration.rb', line 14

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