Class: Gitlab::HashedPath

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

Instance Method Summary collapse

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_sObject 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