Class: Compo::Leaf
- Inherits:
-
NullComposite
- Object
- NullComposite
- Compo::Leaf
- Includes:
- Movable, ParentTracker, UrlReferenceable
- Defined in:
- lib/compo/leaf.rb
Overview
A simple implementation of a leaf node
Leaves have no children, but can be moved to one. They implement the Composite API, but all additions and removals fail, and the Leaf always reports no children.
Instance Attribute Summary
Attributes included from ParentTracker
Instance Method Summary collapse
-
#initialize ⇒ Leaf
constructor
Initialises the Leaf.
Methods included from UrlReferenceable
Methods included from ParentTracker
#remove_parent, #update_parent
Methods included from Movable
Methods inherited from NullComposite
Methods included from Composite
#add, #get_child, #remove, #remove_id
Constructor Details
#initialize ⇒ Leaf
Initialises the Leaf
The Leaf is created with no children, no parent, and no ID.
23 24 25 |
# File 'lib/compo/leaf.rb', line 23 def initialize remove_parent end |