Exception: Purl::ValidationError
- Defined in:
- lib/purl/errors.rb
Overview
Validation errors for PURL components
Direct Known Subclasses
InvalidNameError, InvalidNamespaceError, InvalidQualifierError, InvalidSubpathError, InvalidTypeError, InvalidVersionError
Instance Attribute Summary collapse
-
#component ⇒ Object
readonly
Returns the value of attribute component.
-
#rule ⇒ Object
readonly
Returns the value of attribute rule.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(message, component: nil, value: nil, rule: nil) ⇒ ValidationError
constructor
A new instance of ValidationError.
Constructor Details
#initialize(message, component: nil, value: nil, rule: nil) ⇒ ValidationError
Returns a new instance of ValidationError.
11 12 13 14 15 16 |
# File 'lib/purl/errors.rb', line 11 def initialize(, component: nil, value: nil, rule: nil) super() @component = component @value = value @rule = rule end |
Instance Attribute Details
#component ⇒ Object (readonly)
Returns the value of attribute component.
9 10 11 |
# File 'lib/purl/errors.rb', line 9 def component @component end |
#rule ⇒ Object (readonly)
Returns the value of attribute rule.
9 10 11 |
# File 'lib/purl/errors.rb', line 9 def rule @rule end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
9 10 11 |
# File 'lib/purl/errors.rb', line 9 def value @value end |