Class: HamlLint::ParsedRuby
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- HamlLint::ParsedRuby
- Defined in:
- lib/haml_lint/parsed_ruby.rb
Overview
A thin wrapper around the syntax tree from the Parser gem.
Instance Method Summary collapse
-
#contains_instance_variables? ⇒ true, false
Checks whether the syntax tree contains any instance variables.
Instance Method Details
#contains_instance_variables? ⇒ true, false
Checks whether the syntax tree contains any instance variables.
18 19 20 21 22 |
# File 'lib/haml_lint/parsed_ruby.rb', line 18 def contains_instance_variables? return false unless syntax_tree syntax_tree.ivar_type? || syntax_tree.each_descendant.any?(&:ivar_type?) end |