Exception: Rxhp::AttributeValidator::UnacceptableAttributeError

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

Overview

Indicates that a provided attribute was not whitelisted.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(element, attribute, value) ⇒ UnacceptableAttributeError

Returns a new instance of UnacceptableAttributeError.



25
26
27
28
# File 'lib/rxhp/attribute_validator.rb', line 25

def initialize element, attribute, value
  @element, @attribute, @value = element, attribute, value
  super "Class #{element.class.name} does not support #{attribute}=#{value.inspect}"
end

Instance Attribute Details

#attributeObject (readonly)

Returns the value of attribute attribute.



24
25
26
# File 'lib/rxhp/attribute_validator.rb', line 24

def attribute
  @attribute
end

#elementObject (readonly)

Returns the value of attribute element.



24
25
26
# File 'lib/rxhp/attribute_validator.rb', line 24

def element
  @element
end

#valueObject (readonly)

Returns the value of attribute value.



24
25
26
# File 'lib/rxhp/attribute_validator.rb', line 24

def value
  @value
end