Module: Haml::Filters::Ruby

Includes:
Base
Defined in:
lib/haml/filters.rb

Instance Method Summary collapse

Methods included from Base

included, #internal_compile, #lazy_require, #render, #render_with_options

Instance Method Details

#compile(precompiler, text) ⇒ Object



190
191
192
193
194
195
196
197
198
199
200
201
# File 'lib/haml/filters.rb', line 190

def compile(precompiler, text)
  return if precompiler.options[:suppress_eval]
  precompiler.instance_eval do
    push_silent <<-FIRST.gsub("\n", ';') + text + <<-LAST.gsub("\n", ';')
      _haml_old_stdout, $stdout = $stdout, _haml_old_stdout
      _haml_old_stdout.close
    LAST
  end
end