Class: Slaw::Grammars::PL::Act::Article

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



223
224
225
# File 'lib/slaw/grammars/pl/act_nodes.rb', line 223

def num
  article_prefix.number_letter.text_value
end

#to_xml(b, *args) ⇒ Object



227
228
229
230
231
232
233
234
235
# File 'lib/slaw/grammars/pl/act_nodes.rb', line 227

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

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