Tilt::ErubisTemplate

Erubis template implementation. See: www.kuwata-lab.com/erubis/

Public Instance Methods

initialize_engine() click to toggle source
     # File lib/sinatra/tilt.rb, line 403
403:     def initialize_engine
404:       return if defined? ::Erubis
405:       require_template_library 'erubis'
406:     end
precompiled(locals) click to toggle source
     # File lib/sinatra/tilt.rb, line 425
425:       def precompiled(locals)
426:         source, offset = super
427:         [source, offset - 1]
428:       end
precompiled_postamble(locals) click to toggle source
     # File lib/sinatra/tilt.rb, line 418
418:     def precompiled_postamble(locals)
419:       ["_buf", super].join("\n")
420:     end
precompiled_preamble(locals) click to toggle source
     # File lib/sinatra/tilt.rb, line 414
414:     def precompiled_preamble(locals)
415:       [super, "#{@outvar} = _buf = ''"].join("\n")
416:     end
prepare() click to toggle source
     # File lib/sinatra/tilt.rb, line 408
408:     def prepare
409:       @options.merge!(:preamble => false, :postamble => false)
410:       @outvar = (options.delete(:outvar) || '_erbout').to_s
411:       @engine = ::Erubis::Eruby.new(data, options)
412:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.