Class: Synqa::RelativePathWithHash

Inherits:
Object
  • Object
show all
Defined in:
lib/synqa.rb

Overview

An object representing a file path relative to a base directory, and a hash string

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(relativePath, hash) ⇒ RelativePathWithHash

Returns a new instance of RelativePathWithHash.



45
46
47
48
# File 'lib/synqa.rb', line 45

def initialize(relativePath, hash)
  @relativePath = relativePath
  @hash = hash
end

Instance Attribute Details

#hashObject (readonly)

The hash code, e.g. a1c5b67fdb3cf0df8f1d29ae90561f9ad099bada44aeb6b2574ad9e15f2a84ed



43
44
45
# File 'lib/synqa.rb', line 43

def hash
  @hash
end

#relativePathObject (readonly)

The relative file path (e.g. c:/dir/subdir/file.txt relative to c:/dir would be subdir/file.txt)



40
41
42
# File 'lib/synqa.rb', line 40

def relativePath
  @relativePath
end

Instance Method Details

#inspectObject



50
51
52
# File 'lib/synqa.rb', line 50

def inspect
  return "RelativePathWithHash[#{relativePath}, #{hash}]"
end