Class: RD::DocumentElement
- Includes:
- NonterminalElement
- Defined in:
- lib/rd/element.rb
Overview
root node of document tree
Instance Attribute Summary collapse
-
#blocks ⇒ Object
readonly
Returns the value of attribute blocks.
Attributes included from NonterminalElement
Attributes inherited from Element
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
- #children ⇒ Object
-
#initialize ⇒ DocumentElement
constructor
A new instance of DocumentElement.
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
Constructor Details
#initialize ⇒ DocumentElement
Returns a new instance of DocumentElement.
146 147 148 |
# File 'lib/rd/element.rb', line 146 def initialize() @blocks = [] end |
Instance Attribute Details
#blocks ⇒ Object (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 |
#children ⇒ Object
156 157 158 |
# File 'lib/rd/element.rb', line 156 def children @blocks end |