Skip to content

Commit

Permalink
[rb] fix yard documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Jun 20, 2019
1 parent b8af26b commit 027c9de
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions rb/lib/selenium/webdriver/chrome/options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

#
Expand Down

0 comments on commit 027c9de

Please sign in to comment.