class Browser::Platform::IOS

def device

def device
  ua[MATCHER, 1]
end

def id

def id
  :ios
end

def match?

def match?
  ua.match?(MATCHER)
end

def name

def name
  "iOS (#{device})"
end

def version

def version
  matches = VERSION_MATCHER.match(ua)
  return "0" unless matches
  versions = [matches[:major]]
  if matches[:patch]
    versions.push(matches[:minor], matches[:patch])
  else
    versions.push(matches[:minor]) unless matches[:minor] == "0"
  end
  versions.join(".")
end