Method: Selenium::WebDriver::Chrome::Profile#[]=

Defined in:
lib/selenium/webdriver/chrome/profile.rb

#[]=(key, value) ⇒ Object

Set a preference in the profile.

See src.chromium.org/svn/trunk/src/chrome/common/pref_names.cc


54
55
56
57
# File 'lib/selenium/webdriver/chrome/profile.rb', line 54

def []=(key, value)
  parts = key.split('.')
  parts[0..-2].inject(prefs) { |a, e| a[e] ||= {} }[parts.last] = value
end