Class: Nitro::Elements
- Inherits:
-
Object
- Object
- Nitro::Elements
- Defined in:
- lib/nitro/compiler/elements.rb
Overview
A compiler that handles the processing of Elements
Defined Under Namespace
Classes: Listener
Class Method Summary collapse
Instance Method Summary collapse
-
#transform(source, compiler) ⇒ Object
Expand the elemens found in source.
Class Method Details
.parse(source) ⇒ Object
158 159 160 |
# File 'lib/nitro/compiler/elements.rb', line 158 def parse(source) self.new.parse(source) end |
.transform(source, compiler) ⇒ Object
162 163 164 |
# File 'lib/nitro/compiler/elements.rb', line 162 def transform(source, compiler) self.new.transform(source, compiler) end |
Instance Method Details
#transform(source, compiler) ⇒ Object
Expand the elemens found in source. – gmosx, FIXME: optimize this, how? gmosx, FIXME: this is a hack fix, improve. TODO:farms why is cleanup called this many times?!?!? … waste of gsubs ++
174 175 176 177 178 179 180 |
# File 'lib/nitro/compiler/elements.rb', line 174 def transform(source, compiler) listener = Listener.new(compiler) REXML::Document.parse_stream(source, listener) return listener.buffer end |