Class: Slaw::ZA::Act::NumberedStatement

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

Instance Method Summary collapse

Instance Method Details

#contentObject



273
274
275
276
277
278
279
# File 'lib/slaw/za/act_nodes.rb', line 273

def content
  if elements[3].text_value == ""
    nil
  else
    elements[3].content
  end
end

#numObject



265
266
267
# File 'lib/slaw/za/act_nodes.rb', line 265

def num
  numbered_statement_prefix.num.text_value
end

#parentheses?Boolean

Returns:

  • (Boolean)


269
270
271
# File 'lib/slaw/za/act_nodes.rb', line 269

def parentheses?
  !numbered_statement_prefix.respond_to? :dotted_number_2
end

#to_xml(b, idprefix) ⇒ Object



281
282
283
# File 'lib/slaw/za/act_nodes.rb', line 281

def to_xml(b, idprefix)
  b.p(content.text_value) if content
end