Class: ZplRenderer::Validation::Result
- Inherits:
-
Struct
- Object
- Struct
- ZplRenderer::Validation::Result
- Defined in:
- lib/zpl_renderer/validation.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#ok? ⇒ Object
Returns the value of attribute ok?.
-
#warnings ⇒ Object
Returns the value of attribute warnings.
Instance Method Summary collapse
Instance Attribute Details
#errors ⇒ Object
Returns the value of attribute errors
9 10 11 |
# File 'lib/zpl_renderer/validation.rb', line 9 def errors @errors end |
#ok? ⇒ Object
Returns the value of attribute ok?
9 10 11 |
# File 'lib/zpl_renderer/validation.rb', line 9
def ok?
@ok?
end
|
#warnings ⇒ Object
Returns the value of attribute warnings
9 10 11 |
# File 'lib/zpl_renderer/validation.rb', line 9 def warnings @warnings end |
Instance Method Details
#raise_if_strict!(strict:) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/zpl_renderer/validation.rb', line 10 def raise_if_strict!(strict:) return self if ok? || !strict return self if errors.empty? raise ValidationError, errors.join("; ") end |