Module: Aua::Agents::Msie
- Defined in:
- lib/aua/agents/msie.rb
Constant Summary collapse
- PATTERN =
/(MSIE |Trident\/)([\d.]+)/
- TRIDENT_VERSION_MAP =
{ "7.0" => "11.0" }
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.extend?(agent) ⇒ Boolean
3 4 5 |
# File 'lib/aua/agents/msie.rb', line 3 def self.extend?(agent) agent.app_comments_string =~ PATTERN end |
Instance Method Details
#name ⇒ Object
16 17 18 |
# File 'lib/aua/agents/msie.rb', line 16 def name :MSIE end |
#type ⇒ Object
12 13 14 |
# File 'lib/aua/agents/msie.rb', line 12 def type :Browser end |
#version ⇒ Object
20 21 22 23 24 |
# File 'lib/aua/agents/msie.rb', line 20 def version @version ||= if app_comments_string =~ PATTERN $1 == "Trident\/" ? TRIDENT_VERSION_MAP[$2] || $2 : $2 end end |