Module: Rufus::Sixjo::Erb
- Included in:
- Context
- Defined in:
- lib/rufus/sixjo.rb
Overview
ERB views
Defined Under Namespace
Classes: Local
Instance Method Summary collapse
Instance Method Details
#erb(template, options = {}) ⇒ Object
220 221 222 223 224 225 226 227 228 229 230 |
# File 'lib/rufus/sixjo.rb', line 220 def erb (template, = {}) content = File.read(Sixjo.view_path + "/#{template}.erb") # # TODO : make views/ configurable l = [:locals] l = Local.new(self, l || {}) unless l.is_a?(Local) ::ERB.new(content).result(l.get_binding) end |