Class: OrgParse::RootNode

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

Overview

Root

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(opts) ⇒ RootNode

Returns a new instance of RootNode.



154
155
156
157
158
# File 'lib/org-parse/node.rb', line 154

def initialize(opts)
  super(:ROOT)
  @options = opts
  @section_no = "0"
end

Instance Attribute Details

#optionsObject (readonly)

options



151
152
153
# File 'lib/org-parse/node.rb', line 151

def options
  @options
end

#section_noObject

Returns the value of attribute section_no.



152
153
154
# File 'lib/org-parse/node.rb', line 152

def section_no
  @section_no
end

Instance Method Details

#add(nodes) ⇒ Object



160
161
162
# File 'lib/org-parse/node.rb', line 160

def add(nodes)
  @children += nodes
end