Class: OrgParse::SectionNode

Inherits:
Node
  • Object
show all
Defined in:
lib/org-parse/node.rb

Overview

セクション保持用

children[0] には、必ず Headline Nodeが入る

Instance Attribute Summary collapse

Attributes inherited from Node

#children, #kind, #parent, #value

Instance Method Summary collapse

Methods inherited from Node

#done, #done?, #example?, #html?, #inspect, #is_leaf?, #section_no_array, #set_example, #set_html, #set_src, #set_to_descendant, #set_verse, #src?, #verse?

Constructor Details

#initialize(headline, bodyitems) ⇒ SectionNode

コンストラクタ

headline

セクション開始の Headline

bodyitems

セクションに含まれるブロック要素



175
176
177
178
179
# File 'lib/org-parse/node.rb', line 175

def initialize(headline, bodyitems)
  @section_no = "0"
  headline.parent = self
  super(:SECTION, bodyitems, headline)
end

Instance Attribute Details

#section_noObject

Returns the value of attribute section_no.



170
171
172
# File 'lib/org-parse/node.rb', line 170

def section_no
  @section_no
end

Instance Method Details

#headlineObject

Headline のノードを返す



182
183
184
# File 'lib/org-parse/node.rb', line 182

def headline
  @value
end