Class: Stupidedi::Zipper::AbstractPath

Inherits:
Object
  • Object
show all
Defined in:
lib/stupidedi/zipper/path.rb

Direct Known Subclasses

Hole

Instance Method Summary collapse

Instance Method Details

#depthInteger

Distance from the root node

Returns:

  • (Integer)


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

Returns:

  • (Boolean)


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

Returns:

  • (Boolean)


23
# File 'lib/stupidedi/zipper/path.rb', line 23

abstract :last?

#leftArray<#leaf?, #children, #copy>

Contains the node's leftward siblings, sorted nearest to furthest

Returns:

  • (Array<#leaf?, #children, #copy>)


15
# File 'lib/stupidedi/zipper/path.rb', line 15

abstract :left

#parentAbstractPath

Returns:



10
# File 'lib/stupidedi/zipper/path.rb', line 10

abstract :parent

#rightArray<#leaf?, #children, #copy>

Contains the node's rightward siblings, sorted nearest to furthest

Returns:

  • (Array<#leaf?, #children, #copy>)


20
# File 'lib/stupidedi/zipper/path.rb', line 20

abstract :right

#root?Boolean

This method is abstract.

Returns:

  • (Boolean)


7
# File 'lib/stupidedi/zipper/path.rb', line 7

abstract :root?