module

DeviceDetector::Helper

Constants

CAPTURE_GROUP_REGEX = /(\$\d)/
DESKTOP_HINTS = /Windows NT|Macintosh|X11|CrOS/i
HUMAN_BROWSER_HINTS = /Mozilla|AppleWebKit|Chrome|Safari|Firefox|Edge|Edg|MSIE|Trident/i
TOKEN_REGEX = /[a-z0-9][a-z0-9._+-]{2,}/i

Class methods

local_regexes

thread_local declarations generate accessors; they are not assignments.

Source
local_regexes_with_options
Source

Instance methods

capture_groups?(str : String)

Detect capture group

Source
desktop?(user_agent : String)
Source
fill_groups(str : String, regex : String, user_agent : String)

Fill capture groups

Source
human_browser?(user_agent : String)
Source
prepare_regexes(patterns : Enumerable(String), options = Setting::REGEX_OPTS) : Nil
Source
regex(pattern : String, options : Regex::Options) : Regex
Source
regex(pattern : String) : Regex
Source
token_candidates(index : Hash(String, Array(Int32)), user_agent : String, reverse = false)
Source