Exception: Lutaml::Model::ValidationError
- Defined in:
- lib/lutaml/model/error/validation_error.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
- #error_messages ⇒ Object
- #include?(error_class) ⇒ Boolean
-
#initialize(errors) ⇒ ValidationError
constructor
A new instance of ValidationError.
Constructor Details
#initialize(errors) ⇒ ValidationError
Returns a new instance of ValidationError.
6 7 8 9 |
# File 'lib/lutaml/model/error/validation_error.rb', line 6 def initialize(errors) @errors = errors super(errors.join(", ")) end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
4 5 6 |
# File 'lib/lutaml/model/error/validation_error.rb', line 4 def errors @errors end |
Instance Method Details
#error_messages ⇒ Object
15 16 17 |
# File 'lib/lutaml/model/error/validation_error.rb', line 15 def errors.map(&:message) end |
#include?(error_class) ⇒ Boolean
11 12 13 |
# File 'lib/lutaml/model/error/validation_error.rb', line 11 def include?(error_class) errors.any?(error_class) end |