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



336
337
338
# File 'lib/slaw/grammars/za/act_nodes.rb', line 336

def num
  blocklist_item_prefix.text_value
end

#to_xml(b, idprefix) ⇒ Object



340
341
342
343
344
345
346
347
# File 'lib/slaw/grammars/za/act_nodes.rb', line 340

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