Class: DocuBot::LinkTree::Root

Inherits:
Node
  • Object
show all
Defined in:
lib/docubot/link_tree.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#link, #page, #parent, #title

Instance Method Summary collapse

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

#bundleObject (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_sObject



108
109
110
# File 'lib/docubot/link_tree.rb', line 108

def to_s
	"(Table of Contents)"
end