Class: Liquidice::Transformer::Nodes::TextContent
- Inherits:
-
Base
- Object
- Base
- Liquidice::Transformer::Nodes::TextContent
show all
- Defined in:
- lib/liquidice/transformer/nodes/text_content.rb
Instance Attribute Summary
Attributes inherited from Base
#children, #options, #original_text
Instance Method Summary
collapse
Methods inherited from Base
#dot_id, #initialize, #strict_mode?, #transform!, #write_dot, #write_dot_file
Instance Method Details
#can_be_merged?(other) ⇒ Boolean
#merge(other) ⇒ Object
9
10
11
|
# File 'lib/liquidice/transformer/nodes/text_content.rb', line 9
def merge(other)
@original_text += other.original_text
end
|
#text_value ⇒ Object
13
14
15
|
# File 'lib/liquidice/transformer/nodes/text_content.rb', line 13
def text_value
@original_text
end
|
#to_s ⇒ Object
21
22
23
|
# File 'lib/liquidice/transformer/nodes/text_content.rb', line 21
def to_s
@original_text
end
|
#validate! ⇒ Object
5
6
7
|
# File 'lib/liquidice/transformer/nodes/text_content.rb', line 5
def validate!
raise(Liquidice::Errors::TransformerValidationError, "Children must be empty, it always must be a leaf node") unless children.empty?
end
|