Class: Compo::NullComposite
- Inherits:
-
Object
- Object
- Compo::NullComposite
- Includes:
- Composite
- Defined in:
- lib/compo/null_composite.rb
Overview
Null implementation of Composite
Add/remove operations on NullComposite always fail, and #children always returns the empty hash.
This is useful for leaf classes that still need to expose the composite API.
Direct Known Subclasses
Instance Method Summary collapse
-
#children ⇒ Hash
Returns the empty hash.
Methods included from Composite
#add, #get_child, #remove, #remove_id
Instance Method Details
#children ⇒ Hash
Returns the empty hash
22 23 24 |
# File 'lib/compo/null_composite.rb', line 22 def children {} end |