Module: SauceLabs::ParsedValues

Included in:
SauceBrowserFactory
Defined in:
lib/saucelabs/parsed_values.rb

Instance Method Summary collapse

Instance Method Details

#extract_values_from(browser_string) ⇒ String

Extracts browser, version, platform, device from the browser string

browser = safari version=5 platform=Linux device=iPhone

Examples:

extract_values_from(:'safari5|linux|iphone') will extract

Parameters:

  • the (String)

    browser string passed into the method

Returns:

  • (String, String, String, String)

    browser, version, platform and device



17
18
19
20
21
22
23
# File 'lib/saucelabs/parsed_values.rb', line 17

def extract_values_from(browser_string)
  browser = extract_browser(browser_string).to_sym
  version = extract_version(browser_string)
  platform = extract_platform(browser_string)
  device = extract_device(browser_string)
  return browser,version,platform,device
end