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
191 192 193 194 195 196 197 198 199 200 201 202 |
# File 'lib/haml/filters.rb', line 191 def compile(precompiler, text) return if precompiler.[:suppress_eval] precompiler.instance_eval do push_silent " _haml_old_stdout = $stdout\n $stdout = StringIO.new(_hamlout.buffer, 'a')\n FIRST\n _haml_old_stdout, $stdout = $stdout, _haml_old_stdout\n _haml_old_stdout.close\n LAST\n end\nend\n".gsub("\n", ';') + text + "".gsub("\n", ';') |