Class: RocketFuel::Fix::FileSanitizerFix
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from AbstractFix
#check, fix_name, fix_name_value, register!
Class Method Details
.files_to_remove ⇒ Object
19
20
21
|
# File 'lib/rocket_fuel/fix/file_sanitizer_fix.rb', line 19
def files_to_remove
@files_to_remove
end
|
.remove_file(file) ⇒ Object
14
15
16
17
|
# File 'lib/rocket_fuel/fix/file_sanitizer_fix.rb', line 14
def remove_file(file)
@files_to_remove ||= []
@files_to_remove << file
end
|
Instance Method Details
#run ⇒ Object
5
6
7
8
9
10
11
|
# File 'lib/rocket_fuel/fix/file_sanitizer_fix.rb', line 5
def run
self.class.files_to_remove.each do |path|
if FileTest.exist?(path)
FileUtils.rm_rf(path)
end
end
end
|