examples/webapp/vendor/ruby/2.0.0/gems/tilt-1.3.5/lib/tilt/template.rb
# Generates all template source by combining the preamble, template, and
# postamble and returns a two-tuple of the form: [source, offset], where
# source is the string containing (Ruby) source code for the template and
# offset is the integer line offset where line reporting should begin.
#
# Template subclasses may override this method when they need complete
# control over source generation or want to adjust the default line
# offset. In most cases, overriding the #precompiled_template method is
# easier and more appropriate.
Generates all template source by combining the preamble, template, and
postamble and returns a two-tuple of the form: [source, offset], where
source is the string containing (Ruby) source code for the template and
offset is the integer line offset where line reporting should begin.

Template subclasses may override this method when they need complete
control over source generation or want to adjust the default line
offset. In most cases, overriding the #precompiled_template method is
easier and more appropriate.
Generates all template source by combining the preamble template and postamble and returns a two - tuple of the form : [ source offset ] where source is the string containing ( Ruby ) source code for the template and offset is the integer line offset where line reporting should begin . Template subclasses may override this method when they need complete control over source generation or want to adjust the default line offset . In most cases overriding the #precompiled_template method is easier and more appropriate .
def precompiled(locals)
      preamble = precompiled_preamble(locals)
      template = precompiled_template(locals)
      magic_comment = extract_magic_comment(template)
      if magic_comment
        preamble = magic_comment + "\n" + preamble
      end
      parts = [
        preamble,
        template,
        precompiled_postamble(locals)
      ]
      [parts.join("\n"), preamble.count("\n") + 1]
    end
def precompiled ( locals ) preamble = precompiled_preamble ( locals ) template = precompiled_template ( locals ) magic_comment = extract_magic_comment ( template ) if magic_comment preamble = magic_comment + "\n" + preamble end parts = [ preamble , template , precompiled_postamble ( locals ) ] [ parts . join ( "\n" ) , preamble . count ( "\n" ) + 1 ] end
Generates all template source by combining the preamble, template, and
postamble and returns a two-tuple of the form: [source, offset], where
source is the string containing (Ruby) source code for the template and
offset is the integer line offset where line reporting should begin.
Generates all template source by combining the preamble template and postamble and returns a two - tuple of the form : [ source offset ] where source is the string containing ( Ruby ) source code for the template and offset is the integer line offset where line reporting should begin .
# Magic comment e.g. "# coding: utf-8" has to be in the first line. # So we copy the magic comment to the first line.
locals
<not_specific>