class RD::Headline
Constants
- MARK2LEVEL
Attributes
level[RW]
title[R]
Public Class Methods
mark_to_level(mark_str)
click to toggle source
# File lib/rd/block-element.rb, line 44 def Headline.mark_to_level(mark_str) MARK2LEVEL[mark_str] or raise ArgumentError, "#{mark_str} is irregular for Headline mark." end
new(level_num)
click to toggle source
Calls superclass method
RD::NonterminalElement::new
# File lib/rd/block-element.rb, line 25 def initialize(level_num) super() @level = level_num @title = [] end
Public Instance Methods
accept(visitor)
click to toggle source
# File lib/rd/block-element.rb, line 31 def accept(visitor) visitor.visit_Headline(self) end
children()
click to toggle source
# File lib/rd/block-element.rb, line 49 def children @title end
Private Instance Methods
calculate_label()
click to toggle source
# File lib/rd/block-element.rb, line 35 def calculate_label ret = "" @title.each do |i| ret << i.to_label end ret end