Class | Webgen::Tag::Menu::MenuNode |
In: |
lib/webgen/tag/menu.rb
|
Parent: | Object |
Special menu node class. It encapsulates the original node for later access.
children | [R] | Array of the child nodes. |
is_in_tree_of_files | [W] | Set to true if the menu node is in the tree of files. |
node | [R] | The encapsulated node. |
parent | [R] | The parent node. |
Return true if the menu node is in the menu tree of only files.
# File lib/webgen/tag/menu.rb, line 34 34: def is_in_tree_of_files? 35: @is_in_tree_of_files 36: end
Sort recursively all children of the node using the wrapped nodes.
# File lib/webgen/tag/menu.rb, line 39 39: def sort! 40: self.children.sort! {|a,b| a.node <=> b.node} 41: self.children.each {|child| child.sort!} 42: self 43: end