Exception: JsonMessage::ValidationError
- Defined in:
- lib/json_message.rb
Overview
One or more field’s values didn’t match their schema
Instance Method Summary collapse
-
#initialize(field_errs) ⇒ ValidationError
constructor
A new instance of ValidationError.
- #to_s ⇒ Object
Constructor Details
#initialize(field_errs) ⇒ ValidationError
Returns a new instance of ValidationError.
19 20 21 |
# File 'lib/json_message.rb', line 19 def initialize(field_errs) @field_errs = field_errs end |
Instance Method Details
#to_s ⇒ Object
23 24 25 26 |
# File 'lib/json_message.rb', line 23 def to_s err_strs = @field_errs.map{|f, e| "Field: #{f}, Error: #{e}"} err_strs.join(', ') end |