AsciiDoc see: asciidoc.org/
Namespace for Tilt. This module is not intended to be included anywhere.
@see Tilt::Mapping#[]
# File lib/tilt.rb, line 47 def self.[](file) default_mapping[file] end
@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
@return [Tilt::Mapping] the main mapping object
# File lib/tilt.rb, line 12 def self.default_mapping @default_mapping end
@private
# File lib/tilt.rb, line 17 def self.lazy_map default_mapping.lazy_map end
@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
@deprecated Use {register} instead.
# File lib/tilt.rb, line 32 def self.prefer(template_class, *extensions) register(template_class, *extensions) end
# File lib/tilt.rb, line 22 def self.register(template_class, *extensions) default_mapping.register(template_class, *extensions) end
@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
@see Tilt::Mapping#registered?
# File lib/tilt.rb, line 37 def self.registered?(ext) default_mapping.registered?(ext) end
@see Tilt::Mapping#template_for
# File lib/tilt.rb, line 52 def self.template_for(file) default_mapping.template_for(file) end
@see Tilt::Mapping#templates_for
# File lib/tilt.rb, line 57 def self.templates_for(file) default_mapping.templates_for(file) end
Generated with the Darkfish Rdoc Generator 2.