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
277 278 279 280 281 282 283 284 285 286 |
# File 'lib/slaw/grammars/za/act_nodes.rb', line 277 def to_xml(b, idprefix, i=0, &block) id = idprefix + "list#{i}" idprefix = id + '.' b.blockList(id: id) { |b| b.listIntroduction { |b| yield b } if block_given? elements.each { |e| e.to_xml(b, idprefix) } } end |