Exception: Rxhp::AttributeValidator::MissingRequiredAttributeError
- Inherits:
-
ValidationError
- Object
- ScriptError
- ScriptError
- ValidationError
- Rxhp::AttributeValidator::MissingRequiredAttributeError
- Defined in:
- lib/rxhp/attribute_validator.rb
Overview
Indicates that a required attribute was not provided.
Instance Attribute Summary collapse
-
#attribute ⇒ Object
readonly
Returns the value of attribute attribute.
-
#element ⇒ Object
readonly
Returns the value of attribute element.
Instance Method Summary collapse
-
#initialize(element, attribute) ⇒ MissingRequiredAttributeError
constructor
A new instance of MissingRequiredAttributeError.
Constructor Details
#initialize(element, attribute) ⇒ MissingRequiredAttributeError
Returns a new instance of MissingRequiredAttributeError.
34 35 36 37 |
# File 'lib/rxhp/attribute_validator.rb', line 34 def initialize element, attribute @element, @attribute = element, attribute super "Element #{element.inspect} is missing required attributes: #{attribute.inspect}" end |
Instance Attribute Details
#attribute ⇒ Object (readonly)
Returns the value of attribute attribute.
33 34 35 |
# File 'lib/rxhp/attribute_validator.rb', line 33 def attribute @attribute end |
#element ⇒ Object (readonly)
Returns the value of attribute element.
33 34 35 |
# File 'lib/rxhp/attribute_validator.rb', line 33 def element @element end |