Module: Haml::Filters::Erb

Defined in:
lib/haml/filters.rb,
lib/haml/filters.rb

Overview

Parses the filtered text with ERB. Not available if the :suppress_eval option is set to true. Embedded Ruby code is evaluated in the same context as the Haml template.

Class Method Summary collapse

Class Method Details

.precompiled(text)

382
383
384
385
386
# File 'lib/haml/filters.rb', line 382

def precompiled(text)
  #workaround for https://github.com/rtomayko/tilt/pull/183
  require 'erubis' if (defined?(::Erubis) && !defined?(::Erubis::Eruby))
  super.sub(/^#coding:.*?\n/, '')
end