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

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

Instance Method Summary collapse

Instance Method Details

#contentObject



360
361
362
363
# File 'lib/slaw/za/act_nodes.rb', line 360

def content
  # TODO this really seems a bit odd
  item_content.content.text_value if respond_to? :item_content and item_content.respond_to? :content
end

#numObject



356
357
358
# File 'lib/slaw/za/act_nodes.rb', line 356

def num
  blocklist_item_prefix.text_value
end

#to_xml(b, idprefix) ⇒ Object



365
366
367
368
369
370
# File 'lib/slaw/za/act_nodes.rb', line 365

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