Class: Luneta::Layout
- Inherits:
-
Object
- Object
- Luneta::Layout
- Defined in:
- lib/luneta/layout.rb
Instance Method Summary collapse
-
#initialize(file, options = {}) ⇒ Layout
constructor
A new instance of Layout.
- #render(scope = Object.new, locals = {}, &block) ⇒ Object
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, = {}) @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 |