Class: Moxml::C14n::Nodes::TextNode
- Inherits:
-
Moxml::C14n::Node
- Object
- Moxml::C14n::Node
- Moxml::C14n::Nodes::TextNode
- Defined in:
- lib/moxml/c14n/nodes/text_node.rb
Overview
Text node. Stores the decoded value (entity refs resolved).
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from Moxml::C14n::Node
Instance Method Summary collapse
-
#initialize(value:) ⇒ TextNode
constructor
A new instance of TextNode.
- #name ⇒ Object
- #node_type ⇒ Object
- #text_content ⇒ Object
Methods inherited from Moxml::C14n::Node
#add_child, #in_node_set=, #in_node_set?
Constructor Details
#initialize(value:) ⇒ TextNode
Returns a new instance of TextNode.
10 11 12 13 |
# File 'lib/moxml/c14n/nodes/text_node.rb', line 10 def initialize(value:) super() @value = value end |
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
8 9 10 |
# File 'lib/moxml/c14n/nodes/text_node.rb', line 8 def value @value end |
Instance Method Details
#name ⇒ Object
15 16 17 |
# File 'lib/moxml/c14n/nodes/text_node.rb', line 15 def name "#text" end |
#node_type ⇒ Object
19 20 21 |
# File 'lib/moxml/c14n/nodes/text_node.rb', line 19 def node_type :text end |
#text_content ⇒ Object
23 24 25 |
# File 'lib/moxml/c14n/nodes/text_node.rb', line 23 def text_content @value end |