Class: Sycamore::Path::Root Private

Inherits:
Sycamore::Path show all
Includes:
Singleton
Defined in:
lib/sycamore/path_root.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Constant Summary

Constants inherited from Sycamore::Path

ROOT

Instance Attribute Summary

Attributes inherited from Sycamore::Path

#node, #parent

Instance Method Summary collapse

Methods inherited from Sycamore::Path

#==, #branch, #each_node, #eql?, #hash, of, #present_in?, root

Constructor Details

#initializeRoot

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Root.



11
12
13
# File 'lib/sycamore/path_root.rb', line 11

def initialize
  @parent, @node = nil, nil
end

Instance Method Details

#inspectObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



36
37
38
# File 'lib/sycamore/path_root.rb', line 36

def inspect
  '#<Sycamore::Path::Root>'
end

#join(delimiter = '/') ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



28
29
30
# File 'lib/sycamore/path_root.rb', line 28

def join(delimiter = '/')
  ''
end

#lengthObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



24
25
26
# File 'lib/sycamore/path_root.rb', line 24

def length
  0
end

#root?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


20
21
22
# File 'lib/sycamore/path_root.rb', line 20

def root?
  true
end

#to_sObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



32
33
34
# File 'lib/sycamore/path_root.rb', line 32

def to_s
  '#<Path:Root>'
end

#up(distance = 1) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



15
16
17
18
# File 'lib/sycamore/path_root.rb', line 15

def up(distance = 1)
  super unless distance.is_a? Integer
  self
end