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.
45 46 47 48 |
# File 'lib/synqa.rb', line 45 def initialize(relativePath, hash) @relativePath = relativePath @hash = hash end |
Instance Attribute Details
#hash ⇒ Object (readonly)
The hash code, e.g. a1c5b67fdb3cf0df8f1d29ae90561f9ad099bada44aeb6b2574ad9e15f2a84ed
43 44 45 |
# File 'lib/synqa.rb', line 43 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)
40 41 42 |
# File 'lib/synqa.rb', line 40 def relativePath @relativePath end |
Instance Method Details
#inspect ⇒ Object
50 51 52 |
# File 'lib/synqa.rb', line 50 def inspect return "RelativePathWithHash[#{relativePath}, #{hash}]" end |