Exception: Rxhp::AttributeValidator::MissingRequiredAttributeError

Inherits:
ValidationError show all
Defined in:
lib/rxhp/attribute_validator.rb

Overview

Indicates that a required attribute was not provided.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(element, attribute) ⇒ 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

#attributeObject (readonly)

Returns the value of attribute attribute


33
34
35
# File 'lib/rxhp/attribute_validator.rb', line 33

def attribute
  @attribute
end

#elementObject (readonly)

Returns the value of attribute element


33
34
35
# File 'lib/rxhp/attribute_validator.rb', line 33

def element
  @element
end