Class: DocuBot::LinkTree::Root
Instance Attribute Summary collapse
-
#bundle ⇒ Object
readonly
Returns the value of attribute bundle.
Attributes inherited from Node
Instance Method Summary collapse
- #<<(node) ⇒ Object
-
#initialize(bundle) ⇒ Root
constructor
A new instance of Root.
- #to_s ⇒ Object
Methods inherited from Node
#[], #add_to_link_hierarchy, #ancestors, #anchor, #children, #depth, #descendants, #file, #find, #leaf?, #to_txt
Constructor Details
#initialize(bundle) ⇒ Root
Returns a new instance of Root.
98 99 100 101 |
# File 'lib/docubot/link_tree.rb', line 98 def initialize( bundle ) @bundle = bundle @children = [] end |
Instance Attribute Details
#bundle ⇒ Object (readonly)
Returns the value of attribute bundle.
97 98 99 |
# File 'lib/docubot/link_tree.rb', line 97 def bundle @bundle end |
Instance Method Details
#<<(node) ⇒ Object
103 104 105 106 |
# File 'lib/docubot/link_tree.rb', line 103 def <<( node ) node.parent = nil @children << node end |
#to_s ⇒ Object
108 109 110 |
# File 'lib/docubot/link_tree.rb', line 108 def to_s "(Table of Contents)" end |