Module: MinatoErrorHandler::ErrorHandler::ClassMethods
- Defined in:
- lib/minato_error_handler/error_handler.rb
Instance Method Summary collapse
Instance Method Details
#default_error(klass) ⇒ Object
59 60 61 62 63 |
# File 'lib/minato_error_handler/error_handler.rb', line 59 def default_error(klass) # rubocop:disable Style/ClassVars class_variable_set(:@@default_error_class, klass.to_s.camelize.constantize) # rubocop:enable Style/ClassVars end |
#default_error_class ⇒ Object
65 66 67 68 69 |
# File 'lib/minato_error_handler/error_handler.rb', line 65 def default_error_class return nil unless class_variable_defined? :@@default_error_class class_variable_get(:@@default_error_class) end |