Class: L::Util::TargetUninstall

Inherits:
C::TargetTag
  • Object
show all
Includes:
Singleton
Defined in:
lib/rub/l/util.rb

Instance Method Summary collapse

Constructor Details

#initializeTargetUninstall

Returns a new instance of TargetUninstall.



34
35
36
37
38
39
# File 'lib/rub/l/util.rb', line 34

def initialize
  super :uninstall
  @files = Set.new
  
  register
end

Instance Method Details

#add(f) ⇒ Object



41
42
43
44
45
46
47
# File 'lib/rub/l/util.rb', line 41

def add(f)
  f = R::Tool.make_set_paths f
  
  @files.merge f
  
  f
end

#buildObject



49
50
51
# File 'lib/rub/l/util.rb', line 49

def build
  R::run(['rm', '-fv']+@files.to_a, "Removing installed files.", importance: :med)
end