Module | Merb::Template |
In: |
lib/merb-core/controller/template.rb
|
EXTENSIONS | = | {} unless defined?(EXTENSIONS) |
METHOD_LIST | = | {} unless defined?(METHOD_LIST) |
MTIMES | = | {} unless defined?(MTIMES) |
Takes a template at a particular path and inlines it into a module and adds it to the METHOD_LIST table to speed lookup later.
path<String>: | The full path of the template (minus the templating specifier) to inline. |
mod<Module>: | The module to put the compiled method into. Defaults to Merb::InlineTemplates |
Even though this method supports inlining into any module, the method must be available to instances of AbstractController that will use it.
Registers the extensions that will trigger a particular templating engine.
engine<Class>: | The class of the engine that is being registered |
extensions<Array[String]>: | The list of extensions that will be registered with this templating language |
ArgumentError: | engine does not have a compile_template method. |
Merb::Template.register_extensions(Merb::Template::Erubis, ["erb"])
Get the name of the template method for a particular path.
path<String>: | A full path to find a template method for. |
template_stack<Array>: | The template stack. Not used. |
DOC
Get the template‘s method name from a full path. This replaces non-alphanumeric characters with __ and "." with "_"
Collisions are potentially possible with something like: ~foo.bar and __foo.bar or !foo.bar.
path<String>: | A full path to convert to a valid Ruby method name |
String: | The template name. |