Class: Slaw::Grammars::PL::Act::Subdivision
- Inherits:
-
Treetop::Runtime::SyntaxNode
- Object
- Treetop::Runtime::SyntaxNode
- Slaw::Grammars::PL::Act::Subdivision
- Defined in:
- lib/slaw/grammars/pl/act_nodes.rb
Instance Method Summary collapse
Instance Method Details
#num ⇒ Object
159 160 161 |
# File 'lib/slaw/grammars/pl/act_nodes.rb', line 159 def num heading.num end |
#to_xml(b, *args) ⇒ Object
163 164 165 166 167 168 169 170 |
# File 'lib/slaw/grammars/pl/act_nodes.rb', line 163 def to_xml(b, *args) id = "subdivision-#{num}" b.subdivision(id: id) { |b| heading.to_xml(b) children.elements.each_with_index { |e, i| e.to_xml(b, id + '.', i) } } end |