Class: Zizia::Validator::Error
- Inherits:
-
Struct
- Object
- Struct
- Zizia::Validator::Error
- Defined in:
- lib/zizia/validator.rb
Overview
A representation of an error encountered in validation.
Instance Attribute Summary collapse
-
#description ⇒ #to_s
A long form description or message.
-
#lineno ⇒ #to_s
The line number, or other indication of the location where the error was encountered.
-
#name ⇒ #to_s
A short descriptive name for the given error.
-
#validator ⇒ #to_s
The validator that generated this error.
Instance Method Summary collapse
Instance Attribute Details
#description ⇒ #to_s
Returns a long form description or message.
58 59 60 |
# File 'lib/zizia/validator.rb', line 58 def description @description end |
#lineno ⇒ #to_s
Returns the line number, or other indication of the location where the error was encountered.
58 59 60 |
# File 'lib/zizia/validator.rb', line 58 def lineno @lineno end |
#name ⇒ #to_s
Returns a short descriptive name for the given error.
58 59 60 |
# File 'lib/zizia/validator.rb', line 58 def name @name end |
#validator ⇒ #to_s
Returns the validator that generated this error.
58 59 60 |
# File 'lib/zizia/validator.rb', line 58 def validator @validator end |
Instance Method Details
#to_s ⇒ String
78 79 80 |
# File 'lib/zizia/validator.rb', line 78 def to_s "#{name}: #{description} (#{validator})" end |
#validator_error? ⇒ Boolean
72 73 74 |
# File 'lib/zizia/validator.rb', line 72 def validator_error? true end |