Sha256: afd433e14d8972433ee5d136b6cf06e5d13e198b5582cb950a953cd11b7899cc
Contents?: true
Size: 402 Bytes
Versions: 1
Compression:
Stored size: 402 Bytes
Contents
module Aua::Agents::Msie def self.extend?(agent) agent.app_comments_string =~ PATTERN end PATTERN = /(MSIE |Trident\/)([\d.]+)/ TRIDENT_VERSION_MAP = { "7.0" => "11.0" } def type :Browser end def name :MSIE end def version @version ||= begin app_comments_string =~ PATTERN $1 == "Trident\/" ? TRIDENT_VERSION_MAP[$2] || $2 : $2 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
aua-0.2.3 | lib/aua/agents/msie.rb |