Class: ActionView::CompiledTemplates

Class | ActionView::CompiledTemplates
In: | lib/action_view/compiled_templates.rb
Parent: | Module

CompiledTemplates modules hold methods that have been compiled. Templates are compiled into these methods so that they do not need to be read and parsed for each request.

Each template may be compiled into one or more methods. Each method accepts a given set of parameters which is used to implement local assigns passing.

To use a compiled template module, create a new instance and include it into the class in which you want the template to be rendered.

### Methods

compile_source compiled? full_key mtime new selector wrap_source

### Attributes

method_names | [R] |

### Public Class methods

new()

### Public Instance methods

compile_source(identifier, arg_names, source, initial_line_number = 0, file_name = nil)

Compile the provided source code for the given argument names and with the given initial line number. The identifier should be unique to this source.

The file_name, if provided will appear in backtraces. If not provided, the file_name defaults to the identifier.

This method will return the selector for the compiled version of this method.

compiled?(identifier, arg_names)

Alias for selector

full_key(identifier, arg_names)

Return the full key for the given identifier and argument names

mtime(identifier, arg_names)

Return the time at which the method for the given identifier and argument names was compiled.

selector(identifier, arg_names)

Return the selector for this method or nil if it has not been compiled

wrap_source(name, arg_names, source)

Wrap the provided source in a def … end block.

[Validate]