Class: Luneta::Template

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

Instance Method Summary collapse

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, options = {})
  @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