Class: Slaw::Grammars::ZA::Act::Section
- Inherits:
-
Treetop::Runtime::SyntaxNode
- Object
- Treetop::Runtime::SyntaxNode
- Slaw::Grammars::ZA::Act::Section
- Defined in:
- lib/slaw/grammars/za/act_nodes.rb
Instance Method Summary collapse
Instance Method Details
#num ⇒ Object
205 206 207 |
# File 'lib/slaw/grammars/za/act_nodes.rb', line 205 def num section_title.num end |
#to_xml(b, *args) ⇒ Object
209 210 211 212 213 214 215 216 217 |
# File 'lib/slaw/grammars/za/act_nodes.rb', line 209 def to_xml(b, *args) id = "section-#{num}" b.section(id: id) { |b| section_title.to_xml(b) idprefix = "#{id}." children.elements.each_with_index { |e, i| e.to_xml(b, idprefix, i) } } end |