module Tilt
def self.[](file)
- See: Tilt::Mapping#[] -
def self.[](file) @default_mapping[file] end
def self.finalize!
is called, all attempts to modify the default mapping will fail.
libraries you desire to use have already been loaded. Once this is
mapping. This can be done to improve performance after the template
Replace the default mapping with a finalized version of the default
def self.finalize! return self if @default_mapping.is_a?(FinalizedMapping) class << self prepend(Module.new do def lazy_map(*) raise "Tilt.#{__callee__} not supported after Tilt.finalize! has been called" end alias register lazy_map alias register_lazy lazy_map alias register_pipeline lazy_map alias prefer lazy_map end) end @default_mapping = @default_mapping.finalized freeze end
def self.lazy_map
- Private: -
def self.lazy_map @default_mapping.lazy_map end
def self.new(file, line=nil, options=nil, &block)
- See: Tilt::Mapping#new -
def self.new(file, line=nil, options=nil, &block) @default_mapping.new(file, line, options, &block) end
def self.register(template_class, *extensions)
- See: Tilt::Mapping#register -
def self.register(template_class, *extensions) @default_mapping.register(template_class, *extensions) end
def self.register_lazy(class_name, file, *extensions)
- See: Tilt::Mapping#register_lazy -
def self.register_lazy(class_name, file, *extensions) @default_mapping.register_lazy(class_name, file, *extensions) end
def self.register_pipeline(ext, options=EMPTY_HASH)
- See: Tilt::Mapping#register_pipeline -
def self.register_pipeline(ext, options=EMPTY_HASH) @default_mapping.register_pipeline(ext, options) end
def self.registered?(ext)
- See: Tilt::Mapping#registered? -
def self.registered?(ext) @default_mapping.registered?(ext) end
def self.template_for(file)
- See: Tilt::Mapping#template_for -
def self.template_for(file) @default_mapping.template_for(file) end
def self.templates_for(file)
- See: Tilt::Mapping#templates_for -
def self.templates_for(file) @default_mapping.templates_for(file) end
def lazy_map(*)
def lazy_map(*) raise "Tilt.#{__callee__} not supported after Tilt.finalize! has been called" end