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
207 208 209 |
# File 'lib/slaw/grammars/za/act_nodes.rb', line 207 def num section_title.num end |
#title ⇒ Object
211 212 213 |
# File 'lib/slaw/grammars/za/act_nodes.rb', line 211 def title section_title.title end |
#to_xml(b, *args) ⇒ Object
215 216 217 218 219 220 221 222 223 224 225 |
# File 'lib/slaw/grammars/za/act_nodes.rb', line 215 def to_xml(b, *args) id = "section-#{num}" b.section(id: id) { |b| b.num("#{num}.") b.heading(title) idprefix = "#{id}." children.elements.each_with_index { |e, i| e.to_xml(b, idprefix, i) } } end |