class HamlLint::Tree::SilentScriptNode

Represents a HAML silent script node (`- some_expression`) which executes code without producing output.

Public Instance Methods

parsed_script() click to toggle source

The Ruby script contents parsed into a syntax tree.

@return [ParsedRuby] syntax tree in the form returned by Parser gem

# File lib/haml_lint/tree/silent_script_node.rb, line 10
def parsed_script
  HamlLint::ParsedRuby.new(HamlLint::RubyParser.new.parse(script))
end
script() click to toggle source

Returns the source for the script following the `-` marker.

@return [String]

# File lib/haml_lint/tree/silent_script_node.rb, line 17
def script
  @value[:text]
end