Class: Tooled::TreeNodeCollection
- Inherits:
-
Set
- Object
- Set
- Tooled::TreeNodeCollection
- Defined in:
- lib/tooled/tree_node_collection.rb
Instance Method Summary collapse
- #add(node) ⇒ Object (also: #<<)
Instance Method Details
#add(node) ⇒ Object Also known as: <<
7 8 9 10 11 |
# File 'lib/tooled/tree_node_collection.rb', line 7 def add(node) raise InvalidNodeException.new("Only TreeNode objects can be added to collection") unless node.is_a?(TreeNode) @hash[node] = true self end |