Parses the filtered text with the normal Ruby interpreter. All output sent to `$stdout`, such as with `puts`, is output into the Haml document. Not available if the {file:HAML_REFERENCE.md#suppress_eval-option `:suppress_eval`} option is set to true. The Ruby code is evaluated in the same context as the Haml template.
@see Base#compile
# File lib/haml/filters.rb, line 261 261: def compile(precompiler, text) 262: return if precompiler.options[:suppress_eval] 263: precompiler.instance_eval do 264: push_silent _haml_old_stdout = $stdout $stdout = StringIO.new(_hamlout.buffer, 'a').gsub("\n", ';') + text + _haml_old_stdout, $stdout = $stdout, _haml_old_stdout _haml_old_stdout.close.gsub("\n", ';') 265: end 266: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.