Class: Stupidedi::Zipper::AbstractPath
- Inherits:
-
Object
- Object
- Stupidedi::Zipper::AbstractPath
- Defined in:
- lib/stupidedi/zipper/path.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#depth ⇒ Integer
Distance from the root node.
-
#first? ⇒ Boolean
abstract
True when the node has no leftward siblings.
-
#last? ⇒ Boolean
abstract
True when the node has no rightward siblings.
-
#left ⇒ Array<#leaf?, #children, #copy>
Contains the node's leftward siblings, sorted nearest to furthest.
- #parent ⇒ AbstractPath
-
#right ⇒ Array<#leaf?, #children, #copy>
Contains the node's rightward siblings, sorted nearest to furthest.
- #root? ⇒ Boolean abstract
Instance Method Details
#depth ⇒ Integer
Distance from the root node
31 |
# File 'lib/stupidedi/zipper/path.rb', line 31 abstract :depth |
#first? ⇒ Boolean
This method is abstract.
True when the node has no leftward siblings
26 |
# File 'lib/stupidedi/zipper/path.rb', line 26 abstract :first? |
#last? ⇒ Boolean
This method is abstract.
True when the node has no rightward siblings
23 |
# File 'lib/stupidedi/zipper/path.rb', line 23 abstract :last? |
#left ⇒ Array<#leaf?, #children, #copy>
Contains the node's leftward siblings, sorted nearest to furthest
15 |
# File 'lib/stupidedi/zipper/path.rb', line 15 abstract :left |
#right ⇒ Array<#leaf?, #children, #copy>
Contains the node's rightward siblings, sorted nearest to furthest
20 |
# File 'lib/stupidedi/zipper/path.rb', line 20 abstract :right |
#root? ⇒ Boolean
This method is abstract.
7 |
# File 'lib/stupidedi/zipper/path.rb', line 7 abstract :root? |