Class: HamlLint::Tree::SilentScriptNode

Inherits:
Node
  • Object
show all
Defined in:
lib/haml_lint/tree/silent_script_node.rb

Overview

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

Instance Attribute Summary

Attributes inherited from Node

#children, #line, #parent, #type

Instance Method Summary collapse

Methods inherited from Node

#find, #initialize, #inspect, #next_node, #source_code, #successor, #text

Constructor Details

This class inherits a constructor from HamlLint::Tree::Node

Instance Method Details

#scriptString

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

Returns:

  • (String)


8
9
10
# File 'lib/haml_lint/tree/silent_script_node.rb', line 8

def script
  @value[:text]
end