Sha256: 936f126cabe62fca857c0dada3e5992be9222cb1dc939bcccdb888621a88c6a5
Contents?: true
Size: 655 Bytes
Versions: 6
Compression:
Stored size: 655 Bytes
Contents
require 'user_agent_parser/parser' require 'user_agent_parser/user_agent' require 'user_agent_parser/version' require 'user_agent_parser/operating_system' module UserAgentParser # Path to the ua-parser regexes pattern database def self.patterns_path @patterns_path end # Sets the path to the ua-parser regexes pattern database def self.patterns_path=(path) @patterns_path = path end self.patterns_path = File.join(File.dirname(__FILE__), "../vendor/ua-parser/regexes.yaml") # Parse the given +user_agent_string+, returning a +UserAgent+ def self.parse user_agent_string Parser.new.parse user_agent_string end end
Version data entries
6 entries across 6 versions & 1 rubygems