Class: Luneta::Template
- Inherits:
-
Object
- Object
- Luneta::Template
- Defined in:
- lib/luneta/template.rb
Instance Method Summary collapse
-
#initialize(file, options = {}) ⇒ Template
constructor
A new instance of Template.
- #render(scope = Object.new, locals = {}, &block) ⇒ Object
Constructor Details
#initialize(file, options = {}) ⇒ Template
Returns a new instance of Template.
5 6 7 |
# File 'lib/luneta/template.rb', line 5 def initialize(file, = {}) @template = Tilt.new(file) end |
Instance Method Details
#render(scope = Object.new, locals = {}, &block) ⇒ Object
9 10 11 |
# File 'lib/luneta/template.rb', line 9 def render(scope=Object.new, locals={}, &block) @template.render(scope, locals, &block) end |