Erubis template implementation. See: www.kuwata-lab.com/erubis/
ErubisTemplate supports the following additional options, which are not passed down to the Erubis engine:
:engine_class allows you to specify a custom engine class to use instead of the default (which is ::Erubis::Eruby). :escape_html when true, ::Erubis::EscapedEruby will be used as the engine class instead of the default. All content within <%= %> blocks will be automatically html escaped.
# File lib/tilt/erb.rb, line 80 80: def initialize_engine 81: require_template_library 'erubis' 82: end
# File lib/tilt/erb.rb, line 103 103: def precompiled(locals) 104: source, offset = super 105: [source, offset - 1] 106: end
# File lib/tilt/erb.rb, line 96 96: def precompiled_postamble(locals) 97: [@outvar, super].join("\n") 98: end
# File lib/tilt/erb.rb, line 92 92: def precompiled_preamble(locals) 93: [super, "#{@outvar} = _buf = ''"].join("\n") 94: end
# File lib/tilt/erb.rb, line 84 84: def prepare 85: @outvar = options.delete(:outvar) || self.class.default_output_variable 86: @options.merge!(:preamble => false, :postamble => false, :bufvar => @outvar) 87: engine_class = options.delete(:engine_class) 88: engine_class = ::Erubis::EscapedEruby if options.delete(:escape_html) 89: @engine = (engine_class || ::Erubis::Eruby).new(data, options) 90: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.