class Browser::Platform::Mac

Public Instance Methods

id() click to toggle source
# File lib/browser/platform/mac.rb, line 16
def id
  :mac
end
match?() click to toggle source
# File lib/browser/platform/mac.rb, line 20
def match?
  ua.include?("Mac")
end
name() click to toggle source
# File lib/browser/platform/mac.rb, line 10
def name
  return "macOS" if platform.mac?(">= 10.12")

  "Mac OS X"
end
version() click to toggle source
# File lib/browser/platform/mac.rb, line 6
def version
  (ua[/Mac OS X\s*([0-9_.]+)?/, 1] || "0").tr("_", ".")
end