Module: Selenium::WebDriver::FileReaper Private
Do not use. This module is for internal use only.
Relationships & Source Files | |
Defined in: | rb/lib/selenium/webdriver/common/file_reaper.rb |
Class Attribute Summary
- .reap(file) rw Internal use only
- .reap=(value) rw Internal use only
- .reap? ⇒ Boolean rw Internal use only
Class Method Summary
- .<<(file) Internal use only
- .reap! Internal use only
- .tmp_files Internal use only
Class Attribute Details
.reap(file) (rw)
# File 'rb/lib/selenium/webdriver/common/file_reaper.rb', line 43
def reap(file) return unless reap? raise Error::WebDriverError, "file not added for reaping: #{file.inspect}" unless tmp_files.include?(file) FileUtils.rm_rf tmp_files.delete(file) end
.reap=(value) (rw)
[ GitHub ]# File 'rb/lib/selenium/webdriver/common/file_reaper.rb', line 28
attr_writer :reap
.reap? ⇒ Boolean
(rw)
# File 'rb/lib/selenium/webdriver/common/file_reaper.rb', line 30
def reap? @reap = defined?(@reap) ? @reap : true end
Class Method Details
.<<(file)
[ GitHub ]# File 'rb/lib/selenium/webdriver/common/file_reaper.rb', line 39
def <<(file) tmp_files << file end
.reap!
[ GitHub ].tmp_files
[ GitHub ]# File 'rb/lib/selenium/webdriver/common/file_reaper.rb', line 34
def tmp_files @tmp_files ||= Hash.new { |hash, pid| hash[pid] = [] } @tmp_files[Process.pid] end