Module: Astray::PathLike

Includes:
Comparable
Included in:
File, Repository
Defined in:
lib/astray/path_like.rb

Instance Method Summary collapse

Instance Method Details

#<=>(other) ⇒ Object



7
8
9
# File 'lib/astray/path_like.rb', line 7

def <=>(other)
  path <=> other.path if other.is_a? PathLike
end

#hashObject



12
13
14
# File 'lib/astray/path_like.rb', line 12

def hash
  path.hash
end

#inspectObject



16
17
18
# File 'lib/astray/path_like.rb', line 16

def inspect
  "#<#{self.class}:#{path}>"
end

#to_sObject



20
21
22
# File 'lib/astray/path_like.rb', line 20

def to_s
  path.to_s
end