Class: RbbCode::Node
- Inherits:
-
Object
- Object
- RbbCode::Node
- Defined in:
- lib/rbbcode/tree_maker.rb
Instance Attribute Summary collapse
-
#children ⇒ Object
Returns the value of attribute children.
-
#parent ⇒ Object
Returns the value of attribute parent.
Instance Method Summary collapse
- #<<(child) ⇒ Object
-
#initialize(parent) ⇒ Node
constructor
A new instance of Node.
Constructor Details
#initialize(parent) ⇒ Node
Returns a new instance of Node.
26 27 28 29 |
# File 'lib/rbbcode/tree_maker.rb', line 26 def initialize(parent) @parent = parent @children = [] end |
Instance Attribute Details
#children ⇒ Object
Returns the value of attribute children.
24 25 26 |
# File 'lib/rbbcode/tree_maker.rb', line 24 def children @children end |
#parent ⇒ Object
Returns the value of attribute parent.
31 32 33 |
# File 'lib/rbbcode/tree_maker.rb', line 31 def parent @parent end |
Instance Method Details
#<<(child) ⇒ Object
20 21 22 |
# File 'lib/rbbcode/tree_maker.rb', line 20 def << (child) @children << child end |