Class: HamlLint::Linter::ObjectReferenceAttributes
- Inherits:
-
Linter
- Object
- Linter
- HamlLint::Linter::ObjectReferenceAttributes
- Includes:
- HamlLint::LinterRegistry
- Defined in:
- lib/haml_lint/linter/object_reference_attributes.rb
Overview
Checks for uses of the object reference syntax for assigning the class and
ID attributes for an element (e.g. %div[@user]).
Instance Method Summary collapse
Methods included from HamlLint::LinterRegistry
extract_linters_from, included
Instance Method Details
#visit_tag(node) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/haml_lint/linter/object_reference_attributes.rb', line 9 def visit_tag(node) return unless node.object_reference? record_lint(node, 'Avoid using object reference syntax to assign class/id ' \ 'attributes for tags') end |