Module: Knot::Render
- Defined in:
- lib/knot/render.rb,
lib/knot/render/binding.rb,
lib/knot/render/template.rb
Defined Under Namespace
Classes: Binding, Template
Constant Summary
collapse
- NoTemplateError =
Class.new(RuntimeError)
Class Method Summary
collapse
Class Method Details
.render(filename, search_paths, options = {}) ⇒ Object
9
10
11
12
13
14
|
# File 'lib/knot/render.rb', line 9
def self.render(filename, search_paths, options = {})
binding = Knot::Render::Binding.new(options)
template = Knot::Render::Template.for(filename, search_paths)
return template.result(binding.get_binding)
end
|