Tilt::ERBTemplate

ERB template implementation. See: www.ruby-doc.org/stdlib/libdoc/erb/rdoc/classes/ERB.html

Public Instance Methods

initialize_engine() click to toggle source
# File lib/sinatra/tilt.rb, line 356
def initialize_engine
  return if defined? ::ERB
  require_template_library 'erb'
end
precompiled(locals) click to toggle source
# File lib/sinatra/tilt.rb, line 390
def precompiled(locals)
  source, offset = super
  [source, offset + 1]
end
precompiled_postamble(locals) click to toggle source
# File lib/sinatra/tilt.rb, line 378
def precompiled_postamble(locals)
            #{super}        ensure          #{@outvar} = __original_outvar        end
end
precompiled_preamble(locals) click to toggle source
# File lib/sinatra/tilt.rb, line 370
def precompiled_preamble(locals)
          begin          __original_outvar = #{@outvar} if defined?(#{@outvar})          #{super}
end
precompiled_template(locals) click to toggle source
# File lib/sinatra/tilt.rb, line 366
def precompiled_template(locals)
  @engine.src
end
prepare() click to toggle source
# File lib/sinatra/tilt.rb, line 361
def prepare
  @outvar = (options[:outvar] || '_erbout').to_s
  @engine = ::ERB.new(data, options[:safe], options[:trim], @outvar)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.