Class: Slaw::Grammars::ZA::Act::BlocklistItem

Inherits:
Treetop::Runtime::SyntaxNode
  • Object
show all
Defined in:
lib/slaw/grammars/za/act_nodes.rb

Instance Method Summary collapse

Instance Method Details

#numObject



331
332
333
# File 'lib/slaw/grammars/za/act_nodes.rb', line 331

def num
  blocklist_item_prefix.text_value
end

#to_xml(b, idprefix) ⇒ Object



335
336
337
338
339
340
341
342
# File 'lib/slaw/grammars/za/act_nodes.rb', line 335

def to_xml(b, idprefix)
  b.item(id: idprefix + num.gsub(/[()]/, '')) { |b|
    b.num(num)
    b.p { |b|
      item_content.inline_items.to_xml(b, idprefix) if respond_to? :item_content and item_content.respond_to? :inline_items
    }
  }
end