Method: HamlLint::Tree::ScriptNode#parsed_script
- Defined in:
- lib/haml_lint/tree/script_node.rb
permalink #parsed_script ⇒ ParsedRuby
The Ruby script contents parsed into a syntax tree.
11 12 13 14 15 16 17 18 19 |
# File 'lib/haml_lint/tree/script_node.rb', line 11 def parsed_script statement = if children.empty? script else "#{script}#{@value[:keyword] == 'case' ? ';when 0;end' : ';end'}" end HamlLint::ParsedRuby.new(HamlLint::RubyParser.new.parse(statement)) end |