From 027c9deb063a6fb770c9fec8293def71e4ce00e5 Mon Sep 17 00:00:00 2001 From: Titus Fortner Date: Thu, 20 Jun 2019 08:49:37 +0200 Subject: [PATCH] [rb] fix yard documentation --- rb/lib/selenium/webdriver/chrome/options.rb | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/rb/lib/selenium/webdriver/chrome/options.rb b/rb/lib/selenium/webdriver/chrome/options.rb index 53f6ccbab01bf..a75b2615eff17 100755 --- a/rb/lib/selenium/webdriver/chrome/options.rb +++ b/rb/lib/selenium/webdriver/chrome/options.rb @@ -153,7 +153,9 @@ def headless! end # - # Add an emulation device name + # Add emulation device information + # + # see: http://chromedriver.chromium.org/mobile-emulation # # @example Start Chrome in mobile emulation mode by device name # options = Selenium::WebDriver::Chrome::Options.new @@ -163,13 +165,14 @@ def headless! # options = Selenium::WebDriver::Chrome::Options.new # options.add_emulation(device_metrics: {width: 400, height: 800, pixelRatio: 1, touch: true}) # - # @param [String] device_name Name of the device or a hash containing width, height, pixelRatio, touch - # @param [Hash] device_metrics Hash containing width, height, pixelRatio, touch - # @param [String] user_agent Full user agent + # @param [Hash] opts the pre-defined options for adding mobilie emulation values + # @option opts [String] :device_name A valid device name from the Chrome DevTools Emulation panel + # @option opts [Hash] :device_metrics Hash containing width, height, pixelRatio, touch + # @option opts [String] :user_agent Full user agent # - def add_emulation(**opt) - @options[:emulation] = opt + def add_emulation(**opts) + @options[:emulation] = opts end #