Class: Selenium::WebDriver::Firefox::Extension Private
- Inherits:
-
Object
- Object
- Selenium::WebDriver::Firefox::Extension
- Defined in:
- rb/lib/selenium/webdriver/firefox/extension.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary (collapse)
-
- (Extension) initialize(path)
constructor
private
A new instance of Extension.
- - (Object) write_to(extensions_dir) private
Constructor Details
- (Extension) initialize(path)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Extension
7 8 9 10 11 12 13 14 |
# File 'rb/lib/selenium/webdriver/firefox/extension.rb', line 7 def initialize(path) unless File.exist?(path) raise Error::WebDriverError, "could not find extension at #{path.inspect}" end @path = path @should_reap_root = false end |
Instance Method Details
- (Object) write_to(extensions_dir)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
16 17 18 19 20 21 22 23 24 25 |
# File 'rb/lib/selenium/webdriver/firefox/extension.rb', line 16 def write_to(extensions_dir) root_dir = create_root ext_path = File.join extensions_dir, read_id_from_install_rdf(root_dir) FileUtils.rm_rf ext_path FileUtils.mkdir_p File.dirname(ext_path), :mode => 0700 FileUtils.cp_r root_dir, ext_path FileReaper.reap(root_dir) if @should_reap_root end |