Class: Haml::StringSplitter::SyntaxChecker

Inherits:
Ripper
  • Object
show all
Defined in:
lib/haml/string_splitter.rb

Defined Under Namespace

Classes: ParseError

Class Method Summary collapse

Class Method Details

.syntax_error?(code) ⇒ Boolean

Returns:

  • (Boolean)


120
121
122
123
124
125
# File 'lib/haml/string_splitter.rb', line 120

def self.syntax_error?(code)
  self.new(code).parse
  false
rescue ParseError
  true
end