Class: RD::TextBlock

Inherits:
BlockElement show all
Includes:
ListItemComposable, NonterminalElement
Defined in:
lib/rd/block-element.rb,
lib/rd/rd-struct.rb

Overview

Include

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

#initializeTextBlock

Returns a new instance of TextBlock.



74
75
76
77
# File 'lib/rd/block-element.rb', line 74

def initialize()
  super()
  @content = []
end

Instance Attribute Details

#contentObject

Returns the value of attribute content.



72
73
74
# File 'lib/rd/block-element.rb', line 72

def content
  @content
end

Instance Method Details

#accept(visitor) ⇒ Object



79
80
81
# File 'lib/rd/block-element.rb', line 79

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

#childrenObject



83
84
85
# File 'lib/rd/block-element.rb', line 83

def children
  @content
end