Class: Luneta::Layout

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

Instance Method Summary collapse

Constructor Details

#initialize(file, options = {}) ⇒ Layout

Returns a new instance of Layout.



5
6
7
# File 'lib/luneta/layout.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/layout.rb', line 9

def render(scope=Object.new, locals={}, &block)
  @template.render(scope, locals, &block)
end