Class: Ferrum::Browser::Options::Base

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/ferrum/browser/options/base.rb

Direct Known Subclasses

Chrome, Firefox

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.optionsObject



11
12
13
# File 'lib/ferrum/browser/options/base.rb', line 11

def self.options
  instance
end

Instance Method Details

#detect_pathObject



23
24
25
# File 'lib/ferrum/browser/options/base.rb', line 23

def detect_path
  Binary.find(self.class::PLATFORM_PATH[Utils::Platform.name])
end

#except(*keys) ⇒ Object



19
20
21
# File 'lib/ferrum/browser/options/base.rb', line 19

def except(*keys)
  to_h.reject { |n, _| keys.include?(n) }
end

#merge_default(flags, options) ⇒ Object



31
32
33
# File 'lib/ferrum/browser/options/base.rb', line 31

def merge_default(flags, options)
  raise NotImplementedError
end

#merge_required(flags, options, user_data_dir) ⇒ Object



27
28
29
# File 'lib/ferrum/browser/options/base.rb', line 27

def merge_required(flags, options, user_data_dir)
  raise NotImplementedError
end

#to_hObject



15
16
17
# File 'lib/ferrum/browser/options/base.rb', line 15

def to_h
  self.class::DEFAULT_OPTIONS
end