Module: Templight
- Defined in:
- lib/templight.rb,
lib/templight/version.rb
Constant Summary collapse
- VERSION =
"0.0.3"
Class Method Summary collapse
Class Method Details
.configure(options = {"path" => @template_path}) ⇒ Object
14 15 16 |
# File 'lib/templight.rb', line 14 def self.configure(={"path" => @template_path}) @template_path = ["path"] end |
.render(filename, options = {}) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/templight.rb', line 18 def self.render(filename, ={}) template_string = File.read(File.join(@template_path, filename)) template = ERB.new template_string params = ErbBinding.new() return template.result(params.get_binding) end |