Class: HatiJsonapiError::Config
- Inherits:
-
Object
- Object
- HatiJsonapiError::Config
- Defined in:
- lib/hati_jsonapi_error/config.rb
Class Method Summary collapse
- .configure {|_self| ... } ⇒ Object
- .error_map ⇒ Object
-
.load_errors! ⇒ Object
TODO: check if double defintion of errors.
- .map_errors=(error_map) ⇒ Object
- .use_unexpected=(fallback_error) ⇒ Object
Class Method Details
.configure {|_self| ... } ⇒ Object
20 21 22 |
# File 'lib/hati_jsonapi_error/config.rb', line 20 def configure yield self if block_given? end |
.error_map ⇒ Object
32 33 34 |
# File 'lib/hati_jsonapi_error/config.rb', line 32 def error_map HatiJsonapiError::Registry.error_map end |
.load_errors! ⇒ Object
TODO: check if double defintion of errors
37 38 39 |
# File 'lib/hati_jsonapi_error/config.rb', line 37 def load_errors! HatiJsonapiError::Kigen.load_errors! end |
.map_errors=(error_map) ⇒ Object
28 29 30 |
# File 'lib/hati_jsonapi_error/config.rb', line 28 def map_errors=(error_map) HatiJsonapiError::Registry.error_map = error_map end |
.use_unexpected=(fallback_error) ⇒ Object
24 25 26 |
# File 'lib/hati_jsonapi_error/config.rb', line 24 def use_unexpected=(fallback_error) HatiJsonapiError::Registry.fallback = fallback_error end |