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)



387
388
389
390
391
# File 'lib/haml/filters.rb', line 387

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