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
def initialize_engine
  return if defined? ::Erubis
  require_template_library 'erubis'
end
precompiled(locals) click to toggle source
# File lib/sinatra/tilt.rb, line 425
def precompiled(locals)
  source, offset = super
  [source, offset - 1]
end
precompiled_postamble(locals) click to toggle source
# File lib/sinatra/tilt.rb, line 418
def precompiled_postamble(locals)
  ["_buf", super].join("\n")
end
precompiled_preamble(locals) click to toggle source
# File lib/sinatra/tilt.rb, line 414
def precompiled_preamble(locals)
  [super, "#{@outvar} = _buf = ''"].join("\n")
end
prepare() click to toggle source
# File lib/sinatra/tilt.rb, line 408
def prepare
  @options.merge!(:preamble => false, :postamble => false)
  @outvar = (options.delete(:outvar) || '_erbout').to_s
  @engine = ::Erubis::Eruby.new(data, options)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.