Methods

Included Modules

Haml::Filters::Ruby

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.

Public Instance Methods

compile(compiler, text) click to toggle source

@see Base#compile

     # File lib/haml/filters.rb, line 275
275:       def compile(compiler, text)
276:         return if compiler.options[:suppress_eval]
277:         compiler.instance_eval do
278:           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", ';')
279:         end
280:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.