Class: Nitro::LayoutCompiler
- Inherits:
-
Object
- Object
- Nitro::LayoutCompiler
- Defined in:
- lib/nitro/compiler/layout.rb
Overview
A compiler that handles Rails style simplistic layouts. Perhaps this will be useful for some people that are comming from Rails.
Class Method Summary collapse
-
.transform(source, compiler) ⇒ Object
:nodoc: all.
Class Method Details
.transform(source, compiler) ⇒ Object
:nodoc: all
9 10 11 12 13 14 15 |
# File 'lib/nitro/compiler/layout.rb', line 9 def self.transform(source, compiler) if layout = compiler.controller.ann.self[:layout] return "<#{layout}>#{source}</#{layout}>" else return source end end |