Class: Slaw::Grammars::PL::Act::Section

Inherits:
BlockWithIntroAndChildren show all
Defined in:
lib/slaw/grammars/pl/act_nodes.rb

Instance Method Summary collapse

Methods inherited from BlockWithIntroAndChildren

#intro_and_children_xml, #intro_node

Instance Method Details

#numObject



239
240
241
# File 'lib/slaw/grammars/pl/act_nodes.rb', line 239

def num
  section_prefix.alphanums.text_value
end

#to_xml(b, *args) ⇒ Object



243
244
245
246
247
248
249
250
251
# File 'lib/slaw/grammars/pl/act_nodes.rb', line 243

def to_xml(b, *args)
  id = "section-#{num}"
  idprefix = "#{id}."

  b.section(id: id) { |b|
    b.num("#{num}.")
    intro_and_children_xml(b, idprefix)
  }
end