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)



377
378
379
380
381
# File 'lib/haml/filters.rb', line 377

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