Class: HamlLint::Linter::ObjectReferenceAttributes
- Inherits:
-
HamlLint::Linter
- Object
- HamlLint::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`).
Instance Attribute Summary
Attributes inherited from HamlLint::Linter
Instance Method Summary collapse
Methods included from HamlLint::LinterRegistry
extract_linters_from, included
Methods inherited from HamlLint::Linter
#initialize, #name, #run, #run_or_raise, supports_autocorrect?, #supports_autocorrect?
Methods included from HamlVisitor
Constructor Details
This class inherits a constructor from HamlLint::Linter
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 |