Class: JsonapiErrorsHandler::Configuration
- Inherits:
-
Object
- Object
- JsonapiErrorsHandler::Configuration
- Includes:
- Singleton
- Defined in:
- lib/jsonapi_errors_handler/configuration.rb
Overview
Configuration class allowing to set up the initial behavior for the gem
Instance Attribute Summary collapse
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#handle_unexpected ⇒ Object
writeonly
Sets the attribute handle_unexpected.
Instance Method Summary collapse
-
#configure {|_self| ... } ⇒ Object
Allows to override the configuration options.
-
#handle_unexpected? ⇒ Boolean
Checks if unexpected errors should be handled by the gem.
Instance Attribute Details
#content_type ⇒ Object
Returns the value of attribute content_type.
12 13 14 |
# File 'lib/jsonapi_errors_handler/configuration.rb', line 12 def content_type @content_type end |
#handle_unexpected=(value) ⇒ Object (writeonly)
Sets the attribute handle_unexpected
11 12 13 |
# File 'lib/jsonapi_errors_handler/configuration.rb', line 11 def handle_unexpected=(value) @handle_unexpected = value end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
Allows to override the configuration options
16 17 18 |
# File 'lib/jsonapi_errors_handler/configuration.rb', line 16 def configure yield(self) if block_given? end |
#handle_unexpected? ⇒ Boolean
Checks if unexpected errors should be handled by the gem
23 24 25 |
# File 'lib/jsonapi_errors_handler/configuration.rb', line 23 def handle_unexpected? @handle_unexpected end |