Exception: Fortitude::Errors::InvalidElementAttributes
- Defined in:
- lib/fortitude/errors.rb
Instance Attribute Summary collapse
-
#allowed_attribute_names ⇒ Object
readonly
Returns the value of attribute allowed_attribute_names.
-
#invalid_attributes_hash ⇒ Object
readonly
Returns the value of attribute invalid_attributes_hash.
-
#widget ⇒ Object
readonly
Returns the value of attribute widget.
Instance Method Summary collapse
-
#initialize(widget, tag, invalid_attributes_hash, allowed_attribute_names) ⇒ InvalidElementAttributes
constructor
A new instance of InvalidElementAttributes.
- #tag_name ⇒ Object
Constructor Details
#initialize(widget, tag, invalid_attributes_hash, allowed_attribute_names) ⇒ InvalidElementAttributes
Returns a new instance of InvalidElementAttributes.
68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/fortitude/errors.rb', line 68 def initialize(, tag, invalid_attributes_hash, allowed_attribute_names) = %{The widget #{} tried to render an element, <#{tag.name}>, with attributes that are not allowed: #{invalid_attributes_hash.inspect}. Only these attributes are allowed: #{allowed_attribute_names.sort_by(&:to_s).inspect}} if tag.spec << " (See '#{tag.spec}' for more details.)" end super() @widget = @tag = tag @invalid_attributes_hash = invalid_attributes_hash @allowed_attribute_names = allowed_attribute_names end |
Instance Attribute Details
#allowed_attribute_names ⇒ Object (readonly)
Returns the value of attribute allowed_attribute_names.
66 67 68 |
# File 'lib/fortitude/errors.rb', line 66 def allowed_attribute_names @allowed_attribute_names end |
#invalid_attributes_hash ⇒ Object (readonly)
Returns the value of attribute invalid_attributes_hash.
66 67 68 |
# File 'lib/fortitude/errors.rb', line 66 def invalid_attributes_hash @invalid_attributes_hash end |
#widget ⇒ Object (readonly)
Returns the value of attribute widget.
66 67 68 |
# File 'lib/fortitude/errors.rb', line 66 def @widget end |
Instance Method Details
#tag_name ⇒ Object
81 82 83 |
# File 'lib/fortitude/errors.rb', line 81 def tag_name @tag.name end |