Class: Artifactory::GemImport::Worker::Remover

Inherits:
Base
  • Object
show all
Defined in:
lib/artifactory/gem_import/worker/remover.rb

Constant Summary collapse

NEVER_DELETE =

This gem is required to let the Artifactory Gem Server work properly.

%w(rubygems-update).freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target_repo:, only: /.+/) ⇒ Remover

Returns a new instance of Remover.



10
11
12
13
# File 'lib/artifactory/gem_import/worker/remover.rb', line 10

def initialize(target_repo:, only: /.+/)
  @target_repo = target_repo
  @only = only
end

Instance Attribute Details

#onlyObject (readonly)

Returns the value of attribute only.



8
9
10
# File 'lib/artifactory/gem_import/worker/remover.rb', line 8

def only
  @only
end

#target_repoObject (readonly)

Returns the value of attribute target_repo.



8
9
10
# File 'lib/artifactory/gem_import/worker/remover.rb', line 8

def target_repo
  @target_repo
end

Instance Method Details

#remove!Object



15
16
17
18
19
# File 'lib/artifactory/gem_import/worker/remover.rb', line 15

def remove!
  gems.each &method(:process)

  summary
end