Class: RD::DocumentElement

Inherits:
Element
  • Object
show all
Includes:
NonterminalElement
Defined in:
lib/rd/element.rb

Overview

root node of document tree

Instance Attribute Summary collapse

Attributes included from NonterminalElement

#temporary_document_structure

Attributes inherited from Element

#parent

Instance Method Summary collapse

Methods included from NonterminalElement

#add_child, #add_child_under_document_struct, #add_children, #add_children_under_document_struct, #add_children_without_document_struct, #build, #each_child, #each_element, #make_child, #push_to_children, #under_temporary_document_structure

Methods inherited from Element

#inspect, #tree

Constructor Details

#initializeDocumentElement

Returns a new instance of DocumentElement.



146
147
148
# File 'lib/rd/element.rb', line 146

def initialize()
  @blocks = []
end

Instance Attribute Details

#blocksObject (readonly)

Returns the value of attribute blocks.



144
145
146
# File 'lib/rd/element.rb', line 144

def blocks
  @blocks
end

Instance Method Details

#accept(visitor) ⇒ Object



150
151
152
# File 'lib/rd/element.rb', line 150

def accept(visitor)
  visitor.visit_DocumentElement(self)
end

#childrenObject



156
157
158
# File 'lib/rd/element.rb', line 156

def children
  @blocks
end