Class: Slaw::Grammars::ZA::Act::Blocklist
- Inherits:
-
Treetop::Runtime::SyntaxNode
- Object
- Treetop::Runtime::SyntaxNode
- Slaw::Grammars::ZA::Act::Blocklist
- Defined in:
- lib/slaw/grammars/za/act_nodes.rb
Instance Method Summary collapse
-
#to_xml(b, idprefix, i = 0, &block) ⇒ Object
Render a block list to xml.
Instance Method Details
#to_xml(b, idprefix, i = 0, &block) ⇒ Object
Render a block list to xml. If a block is given, yield to it a builder to insert a listIntroduction node
350 351 352 353 354 355 356 357 358 359 360 |
# File 'lib/slaw/grammars/za/act_nodes.rb', line 350 def to_xml(b, idprefix, i=0, &block) cnt = Slaw::Grammars::Counters.counters[idprefix]['list'] += 1 id = idprefix + "list_#{cnt}" idprefix = id + '__' b.blockList(eId: id, renest: true) { |b| b.listIntroduction { |b| yield b } if block_given? elements.each { |e| e.to_xml(b, idprefix) } } end |