lib/haml_lint/tree/node.rb
# Source code of all lines this node spans (excluding children).
#
# @return [String]
Source code of all lines this node spans (excluding children).
Source code of all lines this node spans ( excluding children ) .
def source_code
      next_node_line =
        if next_node
          next_node.line - 1
        else
          @parser.lines.count + 1
        end
      @parser.lines[@line - 1...next_node_line]
             .join("\n")
             .gsub(/^\s*\z/m, '') 
    end
def source_code next_node_line = if next_node next_node . line - 1 else @parser . lines . count + 1 end @parser . lines [ @line - 1 ... next_node_line ] . join ( "\n" ) . gsub ( / ^ \s * \z /m , '' ) end
Source code of all lines this node spans (excluding children).
Source code of all lines this node spans ( excluding children ) .
# Remove blank lines at the end
None
String