Module: FormattedErrors
- Defined in:
- lib/eipiai/validators/concerns/formatted_errors.rb
Overview
FormattedErrors
copy/paste of the github.com/blendle/formatted_errors gem, until that gem is made open source.
Class Method Summary collapse
Class Method Details
.parse(*errors) ⇒ Object
9 10 11 |
# File 'lib/eipiai/validators/concerns/formatted_errors.rb', line 9 def parse(*errors) { _errors: errors.map { |e| error(e.respond_to?(:to_a) ? e.to_a.flatten : [e]) } } end |