module
DeviceDetector::Helper
Extended Modules
Direct including types
- DeviceDetector::Parser::Bot
- DeviceDetector::Parser::Browser
- DeviceDetector::Parser::Camera
- DeviceDetector::Parser::CarBrowser
- DeviceDetector::Parser::Console
- DeviceDetector::Parser::FeedReader
- DeviceDetector::Parser::Library
- DeviceDetector::Parser::Mediaplayer
- DeviceDetector::Parser::Mobile
- DeviceDetector::Parser::MobileApp
- DeviceDetector::Parser::OS
- DeviceDetector::Parser::PIM
- DeviceDetector::Parser::PortableMediaPlayer
- DeviceDetector::Parser::Television
- DeviceDetector::Parser::VendorFragment
Defined in:
device_detector/helper.crConstant Summary
-
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
Instance Method Summary
-
#capture_groups?(str : String)
Detect capture group
- #desktop?(user_agent : String)
-
#fill_groups(str : String, regex : String, user_agent : String)
Fill capture groups
- #human_browser?(user_agent : String)
- #regex(pattern : String, options : Regex::Options)
- #regex(pattern : String)
- #token_candidates(index : Hash(String, Array(Int32)), user_agent : String, reverse = false)
Instance Method Detail
def token_candidates(index : Hash(String, Array(Int32)), user_agent : String, reverse = false)
#