Module: Haml::StringSplitter
- Defined in:
- lib/haml/string_splitter.rb
Class Method Summary collapse
-
.compile(code)
code
param must be valid string literal.
Class Method Details
.compile(code)
code
param must be valid string literal
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/haml/string_splitter.rb', line 8
def self.compile(code)
unless Ripper.respond_to?(:lex) # truffleruby doesn't have Ripper.lex
return [[:dynamic, code]]
end
begin
Temple::Filters::StringSplitter.compile(code)
rescue Temple::FilterError => e
raise Haml::InternalError.new(e.message)
end
end
|