module Tilt

Namespace for Tilt. This module is not intended to be included anywhere.

AsciiDoc see: asciidoc.org/

Constants

HamlTemplate

Haml >= 6 ships its own template, prefer it when available.

LOCK

@private

TOPOBJECT

@private

VERSION

Current version.

Attributes

default_mapping[R]

@return [Tilt::Mapping] the main mapping object

Public Class Methods

[](file) click to toggle source

@see Tilt::Mapping#[]

   # File lib/tilt.rb
52 def self.[](file)
53   default_mapping[file]
54 end
current_template() click to toggle source

@return the template object that is currently rendering.

@example

tmpl = Tilt['index.erb'].new { '<%= Tilt.current_template %>' }
tmpl.render == tmpl.to_s

@note This is currently an experimental feature and might return nil

in the future.
   # File lib/tilt.rb
74 def self.current_template
75   Thread.current[:tilt_current_template]
76 end
lazy_map() click to toggle source

@private

   # File lib/tilt.rb
17 def self.lazy_map
18   default_mapping.lazy_map
19 end
new(file, line=nil, options={}, &block) click to toggle source

@see Tilt::Mapping#new

   # File lib/tilt.rb
47 def self.new(file, line=nil, options={}, &block)
48   default_mapping.new(file, line, options, &block)
49 end
prefer(template_class, *extensions) click to toggle source

@deprecated Use {register} instead.

   # File lib/tilt.rb
37 def self.prefer(template_class, *extensions)
38   register(template_class, *extensions)
39 end
register(template_class, *extensions) click to toggle source

@see Tilt::Mapping#register

   # File lib/tilt.rb
22 def self.register(template_class, *extensions)
23   default_mapping.register(template_class, *extensions)
24 end
register_lazy(class_name, file, *extensions) click to toggle source

@see Tilt::Mapping#register_lazy

   # File lib/tilt.rb
27 def self.register_lazy(class_name, file, *extensions)
28   default_mapping.register_lazy(class_name, file, *extensions)
29 end
register_pipeline(ext, options={}) click to toggle source

@see Tilt::Mapping#register_pipeline

   # File lib/tilt.rb
32 def self.register_pipeline(ext, options={})
33   default_mapping.register_pipeline(ext, options)
34 end
registered?(ext) click to toggle source

@see Tilt::Mapping#registered?

   # File lib/tilt.rb
42 def self.registered?(ext)
43   default_mapping.registered?(ext)
44 end
template_for(file) click to toggle source

@see Tilt::Mapping#template_for

   # File lib/tilt.rb
57 def self.template_for(file)
58   default_mapping.template_for(file)
59 end
templates_for(file) click to toggle source

@see Tilt::Mapping#templates_for

   # File lib/tilt.rb
62 def self.templates_for(file)
63   default_mapping.templates_for(file)
64 end