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