Class: Slaw::ZA::Act::Section
- Inherits:
-
Treetop::Runtime::SyntaxNode
- Object
- Treetop::Runtime::SyntaxNode
- Slaw::ZA::Act::Section
- Defined in:
- lib/slaw/za/act_nodes.rb
Instance Method Summary collapse
Instance Method Details
#num ⇒ Object
194 195 196 |
# File 'lib/slaw/za/act_nodes.rb', line 194 def num section_title.num end |
#title ⇒ Object
198 199 200 |
# File 'lib/slaw/za/act_nodes.rb', line 198 def title section_title.title end |
#to_xml(b, *args) ⇒ Object
202 203 204 205 206 207 208 209 210 211 212 |
# File 'lib/slaw/za/act_nodes.rb', line 202 def to_xml(b, *args) id = "section-#{num}" b.section(id: id) { |b| b.num("#{num}.") b.heading(title) idprefix = "#{id}." subsections.elements.each_with_index { |e, i| e.to_xml(b, idprefix, i) } } end |