Class: Slaw::ZA::Act::ChapterHeading

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

Instance Method Summary collapse

Instance Method Details

#numObject



177
178
179
# File 'lib/slaw/za/act_nodes.rb', line 177

def num
  chapter_heading_prefix.alphanums.text_value
end

#titleObject



181
182
183
184
185
# File 'lib/slaw/za/act_nodes.rb', line 181

def title
  if heading.text_value and heading.respond_to? :content
    heading.content.text_value.strip
  end
end

#to_xml(b) ⇒ Object



187
188
189
190
# File 'lib/slaw/za/act_nodes.rb', line 187

def to_xml(b)
  b.num(num)
  b.heading(title) if title
end