Method: Wukong::Processor::JoinXML#process
- Defined in:
- lib/wukong/widget/reducers/join_xml.rb
#process(line) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/wukong/widget/reducers/join_xml.rb', line 13 def process line if match = terminator.match(line) if match.end(0) == line.size @lines << line else @lines << line[0...match.end(0)] end yield @lines.join("\n") @lines = [] @lines << line[match.end(0)..-1] unless match.end(0) == line.size else @lines << line end end |