module Selenium::WebDriver::FileReaper
@api private
Attributes
reap[W]
Public Class Methods
<<(file)
click to toggle source
# File lib/selenium/webdriver/common/file_reaper.rb, line 37 def <<(file) tmp_files << file end
reap(file)
click to toggle source
# File lib/selenium/webdriver/common/file_reaper.rb, line 41 def reap(file) return unless reap? unless tmp_files.include?(file) raise Error::WebDriverError, "file not added for reaping: #{file.inspect}" end FileUtils.rm_rf tmp_files.delete(file) end
reap!()
click to toggle source
# File lib/selenium/webdriver/common/file_reaper.rb, line 51 def reap! if reap? tmp_files.each { |file| FileUtils.rm_rf(file) } true else false end end
reap?()
click to toggle source
# File lib/selenium/webdriver/common/file_reaper.rb, line 28 def reap? @reap = defined?(@reap) ? @reap : true end
tmp_files()
click to toggle source
# File lib/selenium/webdriver/common/file_reaper.rb, line 32 def tmp_files @tmp_files ||= Hash.new { |hash, pid| hash[pid] = [] } @tmp_files[Process.pid] end