Class: Synqa::RelativePathWithHash
- Inherits:
-
Object
- Object
- Synqa::RelativePathWithHash
- 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
-
#hash ⇒ Object
readonly
The hash code, e.g.
-
#relativePath ⇒ Object
readonly
The relative file path (e.g. c:/dir/subdir/file.txt relative to c:/dir would be subdir/file.txt).
Instance Method Summary collapse
-
#initialize(relativePath, hash) ⇒ RelativePathWithHash
constructor
A new instance of RelativePathWithHash.
- #inspect ⇒ Object
Constructor Details
#initialize(relativePath, hash) ⇒ RelativePathWithHash
Returns a new instance of RelativePathWithHash.
25 26 27 28 |
# File 'lib/synqa.rb', line 25 def initialize(relativePath, hash) @relativePath = relativePath @hash = hash end |
Instance Attribute Details
#hash ⇒ Object (readonly)
The hash code, e.g. a1c5b67fdb3cf0df8f1d29ae90561f9ad099bada44aeb6b2574ad9e15f2a84ed
23 24 25 |
# File 'lib/synqa.rb', line 23 def hash @hash end |
#relativePath ⇒ Object (readonly)
The relative file path (e.g. c:/dir/subdir/file.txt relative to c:/dir would be subdir/file.txt)
20 21 22 |
# File 'lib/synqa.rb', line 20 def relativePath @relativePath end |
Instance Method Details
#inspect ⇒ Object
30 31 32 |
# File 'lib/synqa.rb', line 30 def inspect return "RelativePathWithHash[#{relativePath}, #{hash}]" end |