Class: Temple::Templates::Tilt
- Inherits:
-
Tilt::Template
- Object
- Tilt::Template
- Temple::Templates::Tilt
- Extended by:
- Mixins::Template
- Defined in:
- lib/temple/templates/tilt.rb
Class Method Summary (collapse)
Instance Method Summary (collapse)
-
- (String) precompiled_template(locals = {})
A string containing the (Ruby) source code for the template.
-
- (void) prepare
Prepare Temple template.
Methods included from Mixins::Template
Methods included from Mixins::DefaultOptions
#default_options, #set_default_options
Class Method Details
+ (Object) register_as(name)
25 26 27 |
# File 'lib/temple/templates/tilt.rb', line 25 def self.register_as(name) ::Tilt.register name.to_s, self end |
Instance Method Details
- (String) precompiled_template(locals = {})
A string containing the (Ruby) source code for the template.
21 22 23 |
# File 'lib/temple/templates/tilt.rb', line 21 def precompiled_template(locals = {}) @src end |
- (void) prepare
This method returns an undefined value.
Prepare Temple template
Called immediately after template data is loaded.
13 14 15 |
# File 'lib/temple/templates/tilt.rb', line 13 def prepare @src = self.class.build_engine({ :file => eval_file }, ).call(data) end |