module Haml::Filters::Erb

Parses the filtered text with ERB. Not available if the {file:REFERENCE.md#suppress_eval-option ‘:suppress_eval`} option is set to true. Embedded Ruby code is evaluated in the same context as the Haml template.

Public Class Methods

precompiled(text) click to toggle source
Calls superclass method
# 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