class HamlLint::ParsedRuby

A thin wrapper around the syntax tree from the Parser gem.

Public Instance Methods

contains_instance_variables?() click to toggle source

Checks whether the syntax tree contains any instance variables.

@return [true, false]

# File lib/haml_lint/parsed_ruby.rb, line 17
def contains_instance_variables?
  return false unless syntax_tree

  syntax_tree.ivar_type? || syntax_tree.each_descendant.any?(&:ivar_type?)
end