Class: Canon::Xml::Nodes::CommentNode
- Inherits:
-
Canon::Xml::Node
- Object
- Canon::Xml::Node
- Canon::Xml::Nodes::CommentNode
- Defined in:
- lib/canon/xml/nodes/comment_node.rb
Overview
Comment node in the XPath data model
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Attributes inherited from Canon::Xml::Node
Instance Method Summary collapse
-
#initialize(value:) ⇒ CommentNode
constructor
A new instance of CommentNode.
- #name ⇒ Object
- #node_type ⇒ Object
- #text_content ⇒ Object
Methods inherited from Canon::Xml::Node
#add_child, #in_node_set=, #in_node_set?, #parse_errors, #parse_errors=
Constructor Details
#initialize(value:) ⇒ CommentNode
Returns a new instance of CommentNode.
10 11 12 13 |
# File 'lib/canon/xml/nodes/comment_node.rb', line 10 def initialize(value:) super() @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
8 9 10 |
# File 'lib/canon/xml/nodes/comment_node.rb', line 8 def value @value end |
Instance Method Details
#name ⇒ Object
15 16 17 |
# File 'lib/canon/xml/nodes/comment_node.rb', line 15 def name "comment" end |
#node_type ⇒ Object
19 20 21 |
# File 'lib/canon/xml/nodes/comment_node.rb', line 19 def node_type :comment end |
#text_content ⇒ Object
23 24 25 |
# File 'lib/canon/xml/nodes/comment_node.rb', line 23 def text_content @value end |