Class: Compo::HashBranch
- Inherits:
-
HashComposite
- Object
- HashComposite
- Compo::HashBranch
- Includes:
- Branch
- Defined in:
- lib/compo/hash_branch.rb
Overview
A simple implementation of a branch, whose children are stored in an Hash
An HashBranch is a composite object that may be moved into other composite objects. It stores its children as an Hash, and the ID of each child is its hash key. Inserting and removing items into the HashBranch will not change the IDs of other items, but inserting with an existing key will remove the previous occupant.
This is an extension of HashComposite to include the Movable and ParentTracker mixins.
Instance Attribute Summary
Attributes included from ParentTracker
Attributes inherited from HashComposite
Method Summary
Methods included from UrlReferenceable
Methods included from ParentTracker
#initialize, #remove_parent, #update_parent