Class: Merb::Template::Markaby

Inherits:
Object
  • Object
show all
Defined in:
lib/merb_markaby/template.rb

Defined Under Namespace

Modules: Mixin

Class Method Summary collapse

Class Method Details

.compile_template(path, name, mod) ⇒ Object

Parameters

path<String>

A full path to the template

name<String>

The name of the method that will be created

mod<Module>

The module that the compiled method will be placed into



9
10
11
12
13
14
# File 'lib/merb_markaby/template.rb', line 9

def self.compile_template(path, name, mod)
  path = File.expand_path(path)
  template = ::Markaby::Template.new(File.read(path))
  template.def_method(mod, name)
  name    
end