class Racket::Utils::FileSystem::SizedPath

Class used for comparing length of paths.

Attributes

path[R]
size[R]

Public Class Methods

new(path) click to toggle source
# File lib/racket/utils/file_system.rb, line 28
def initialize(path)
  @path = path
  @size = 0
  @path.ascend { @size += 1 }
end

Public Instance Methods

<=>(other) click to toggle source

Allow us to compare the current object against other objects of the same type.

@param [SizedPath] other @return [Fixnum]

# File lib/racket/utils/file_system.rb, line 38
def <=>(other)
  other.size <=> @size
end