module Tilt

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

AsciiDoc see: asciidoc.org/

Constants

TOPOBJECT

@private

VERSION

Current version.

Public Class Methods

[](file) click to toggle source

@see Tilt::Mapping#[]

   # File lib/tilt.rb
47 def self.[](file)
48   default_mapping[file]
49 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
69 def self.current_template
70   Thread.current[:tilt_current_template]
71 end
default_mapping() click to toggle source

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

   # File lib/tilt.rb
12 def self.default_mapping
13   @default_mapping
14 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
42 def self.new(file, line=nil, options={}, &block)
43   default_mapping.new(file, line, options, &block)
44 end
prefer(template_class, *extensions) click to toggle source

@deprecated Use {register} instead.

   # File lib/tilt.rb
32 def self.prefer(template_class, *extensions)
33   register(template_class, *extensions)
34 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
registered?(ext) click to toggle source

@see Tilt::Mapping#registered?

   # File lib/tilt.rb
37 def self.registered?(ext)
38   default_mapping.registered?(ext)
39 end
template_for(file) click to toggle source

@see Tilt::Mapping#template_for

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

@see Tilt::Mapping#templates_for

   # File lib/tilt.rb
57 def self.templates_for(file)
58   default_mapping.templates_for(file)
59 end