Class: AsciidoctorVaped::AST::Text
- Inherits:
-
Node
- Object
- Node
- AsciidoctorVaped::AST::Text
show all
- Defined in:
- lib/asciidoctor_vaped/ast/text.rb
Constant Summary
Constants inherited
from Node
Node::TEXT_CONTEXTS
Instance Attribute Summary collapse
Attributes inherited from Node
#parent
Instance Method Summary
collapse
Methods inherited from Node
#<<, #append, #append_children, #parse_inline, #sections
Constructor Details
#initialize(value) ⇒ Text
Returns a new instance of Text.
10
11
12
13
|
# File 'lib/asciidoctor_vaped/ast/text.rb', line 10
def initialize(value)
@value = value
super()
end
|
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
8
9
10
|
# File 'lib/asciidoctor_vaped/ast/text.rb', line 8
def value
@value
end
|
Instance Method Details
#children ⇒ Object
27
28
29
|
# File 'lib/asciidoctor_vaped/ast/text.rb', line 27
def children
[]
end
|
#context ⇒ Object
15
16
17
|
# File 'lib/asciidoctor_vaped/ast/text.rb', line 15
def context
:text
end
|
#text ⇒ Object
19
20
21
|
# File 'lib/asciidoctor_vaped/ast/text.rb', line 19
def text
value
end
|
#text=(value) ⇒ Object
23
24
25
|
# File 'lib/asciidoctor_vaped/ast/text.rb', line 23
def text=(value)
self.value = value
end
|
#to_h ⇒ Object
31
32
33
34
35
36
37
|
# File 'lib/asciidoctor_vaped/ast/text.rb', line 31
def to_h
{
context:,
text:,
children: []
}
end
|