Class: Gitlab::HashedPath
- Inherits:
-
Object
- Object
- Gitlab::HashedPath
- Defined in:
- lib/gitlab/hashed_path.rb
Instance Method Summary collapse
-
#initialize(*paths, root_hash:) ⇒ HashedPath
constructor
A new instance of HashedPath.
- #to_s ⇒ Object (also: #to_str)
Constructor Details
#initialize(*paths, root_hash:) ⇒ HashedPath
Returns a new instance of HashedPath.
7 8 9 10 |
# File 'lib/gitlab/hashed_path.rb', line 7 def initialize(*paths, root_hash:) @paths = paths @root_hash = root_hash end |
Instance Method Details
#to_s ⇒ Object Also known as: to_str
12 13 14 |
# File 'lib/gitlab/hashed_path.rb', line 12 def to_s File.join(disk_hash[0..1], disk_hash[2..3], disk_hash, @paths.map(&:to_s)) end |