struct

DeviceDetector::Parser::OS

Inherits DeviceDetector::Helper < Struct < Value < Object

Constants

ANDROID_REGEX = /Android[ ;\/](\d+[.\d]*)/i
ANDROID_TV_HINTS = /(?:Android(?: UHD)?|Smart)[ _]?TV|AndroidTV|GoogleTV|BRAVIA|wv-atv/i
GENERIC_LINUX_REGEX = /X11; Linux|Linux (?:x86_64|i686|aarch64|armv7l)/i
IOS_REGEX = /(?:CPU OS|iPh(?:one)?[ _]OS|iPhone.+ OS|iOS)[ _\/](\d+(?:[_.]\d+)*)/i
LINUX_DISTRO_HINTS = /Fedora|Ubuntu|Debian|CentOS|Red Hat|RHEL|Gentoo|Arch Linux|SUSE|Mandriva|Mageia|Mint/i
MACOS_REGEX = /Mac[ +]OS[ +]?X(?:[ \/,](?:Version )?(\d+(?:[_.]\d+)+))?/i
WINDOWS_NT_REGEX = /Windows NT (\d+\.\d+)/i
WINDOWS_NT_VERSIONS = {"10.0" => "10", "6.4" => "10", "6.3" => "8.1", "6.2" => "8", "6.1" => "7", "6.0" => "Vista", "5.2" => "Server 2003", "5.1" => "XP", "5.0" => "2000", "4.0" => "NT"}

Constructors

new(user_agent : String)
Source

Class methods

prepare

Compiles all OS rules into a shared immutable registry for parallel parsing.

Source
regex_patterns

Returns the regular-expression sources used by this parser.

Source

Instance methods

android_os
Source
call
Source
common_os
Source
detect_os(operating_system, detected_os)
Source
generic_linux_os
Source
ios_os
Source
kind
Source
macos_os
Source
os_index
Source
os_result(name, version = "")
Source
windows_nt_os
Source

Nested types