module Tilt

AsciiDoc see: asciidoc.org/

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

Constants

RedcarpetTemplate
TOPOBJECT

@private

VERSION

Current version.

Public Class Methods

[](file) click to toggle source

@see Tilt::Mapping#[]

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

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

# File lib/tilt.rb, line 12
def self.default_mapping
  @default_mapping
end
lazy_map() click to toggle source

@private

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

@see Tilt::Mapping#new

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

@deprecated Use {register} instead.

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

@see Tilt::Mapping#register

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

@see Tilt::Mapping#register_lazy

# File lib/tilt.rb, line 27
def self.register_lazy(class_name, file, *extensions)
  default_mapping.register_lazy(class_name, file, *extensions)
end
registered?(ext) click to toggle source

@see Tilt::Mapping#registered?

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

@see Tilt::Mapping#template_for

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

@see Tilt::Mapping#templates_for

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