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
323 324 325 326 327 328 329 330 331 332 |
# File 'lib/slaw/grammars/za/act_nodes.rb', line 323 def to_xml(b, idprefix, i=0, &block) id = idprefix + "list#{i}" idprefix = id + '.' b.blockList(id: id, renest: true) { |b| b.listIntroduction { |b| yield b } if block_given? elements.each { |e| e.to_xml(b, idprefix) } } end |