class Slaw::Grammars::ZA::Act::Subpart
Public Instance Methods
num()
click to toggle source
# File lib/slaw/grammars/za/act_nodes.rb, line 166 def num heading.num end
to_xml(b, id_prefix='', *args)
click to toggle source
# File lib/slaw/grammars/za/act_nodes.rb, line 170 def to_xml(b, id_prefix='', *args) num = self.num if num.empty? num = Slaw::Grammars::Counters.counters[id_prefix]['subpart'] += 1 else num = Slaw::Grammars::Counters.clean(num) end id = id_prefix + "subpart_#{num}" b.subpart(eId: id) { |b| heading.to_xml(b) children.elements.each_with_index { |e, i| e.to_xml(b, id + '__', i) } } end