Class: Gitlab::Cleanup::OrphanJobArtifactFilesBatch::ArtifactFile

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ ArtifactFile

Returns a new instance of ArtifactFile.


11
12
13
# File 'lib/gitlab/cleanup/orphan_job_artifact_files_batch.rb', line 11

def initialize(path)
  @path = path
end

Instance Attribute Details

#pathObject

Returns the value of attribute path


9
10
11
# File 'lib/gitlab/cleanup/orphan_job_artifact_files_batch.rb', line 9

def path
  @path
end

Instance Method Details

#artifact_idObject


15
16
17
# File 'lib/gitlab/cleanup/orphan_job_artifact_files_batch.rb', line 15

def artifact_id
  path.split('/').last.to_i
end