Class: SXRB::Node
- Inherits:
-
Struct
- Object
- Struct
- SXRB::Node
- Defined in:
- lib/sxrb/node.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#children ⇒ Object
Returns the value of attribute children.
-
#name ⇒ Object
Returns the value of attribute name.
-
#namespaces ⇒ Object
Returns the value of attribute namespaces.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#prefix ⇒ Object
Returns the value of attribute prefix.
-
#uri ⇒ Object
Returns the value of attribute uri.
Instance Method Summary collapse
- #append(node) ⇒ Object
-
#initialize(*args, &block) ⇒ Node
constructor
A new instance of Node.
Constructor Details
#initialize(*args, &block) ⇒ Node
Returns a new instance of Node.
4 5 6 7 |
# File 'lib/sxrb/node.rb', line 4 def initialize(*args, &block) super(*args, &block) @children = [] end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes
2 3 4 |
# File 'lib/sxrb/node.rb', line 2 def attributes @attributes end |
#children ⇒ Object
Returns the value of attribute children
3 4 5 |
# File 'lib/sxrb/node.rb', line 3 def children @children end |
#name ⇒ Object
Returns the value of attribute name
2 3 4 |
# File 'lib/sxrb/node.rb', line 2 def name @name end |
#namespaces ⇒ Object
Returns the value of attribute namespaces
2 3 4 |
# File 'lib/sxrb/node.rb', line 2 def namespaces @namespaces end |
#parent ⇒ Object
Returns the value of attribute parent
2 3 4 |
# File 'lib/sxrb/node.rb', line 2 def parent @parent end |
#prefix ⇒ Object
Returns the value of attribute prefix
2 3 4 |
# File 'lib/sxrb/node.rb', line 2 def prefix @prefix end |
#uri ⇒ Object
Returns the value of attribute uri
2 3 4 |
# File 'lib/sxrb/node.rb', line 2 def uri @uri end |
Instance Method Details
#append(node) ⇒ Object
9 10 11 12 |
# File 'lib/sxrb/node.rb', line 9 def append(node) node.parent = self @children << node end |