class Browser::Chrome

Public Instance Methods

full_version() click to toggle source
# File lib/browser/chrome.rb, line 12
def full_version
  # Each regex on its own line to enforce precedence.
  ua[%r[Chrome/([\d.]+)], 1] ||
    ua[%r[CriOS/([\d.]+)], 1] ||
    ua[%r[Safari/([\d.]+)], 1] ||
    ua[%r[AppleWebKit/([\d.]+)], 1] ||
    "0.0"
end
id() click to toggle source
# File lib/browser/chrome.rb, line 4
def id
  :chrome
end
match?() click to toggle source
# File lib/browser/chrome.rb, line 21
def match?
  ua =~ /Chrome|CriOS/ && !opera? && !edge?
end
name() click to toggle source
# File lib/browser/chrome.rb, line 8
def name
  "Chrome"
end