Module: UserAgent::Browsers::InternetExplorer
- Defined in:
- lib/user_agent/browsers/internet_explorer.rb
Class Method Summary collapse
Instance Method Summary collapse
- #browser ⇒ Object
- #compatibility ⇒ Object
- #compatible? ⇒ Boolean
- #os ⇒ Object
- #platform ⇒ Object
- #version ⇒ Object
- #version=(v) ⇒ Object
Class Method Details
.extend?(agent) ⇒ Boolean
4 5 6 7 8 9 |
# File 'lib/user_agent/browsers/internet_explorer.rb', line 4 def self.extend?(agent) agent.application && agent.application.comment && agent.application.comment[0] == "compatible" && agent.application.comment[1].match(/^MSIE/) end |
Instance Method Details
#browser ⇒ Object
11 12 13 |
# File 'lib/user_agent/browsers/internet_explorer.rb', line 11 def browser "Internet Explorer" end |
#compatibility ⇒ Object
23 24 25 |
# File 'lib/user_agent/browsers/internet_explorer.rb', line 23 def compatibility application.comment[0] end |
#compatible? ⇒ Boolean
27 28 29 |
# File 'lib/user_agent/browsers/internet_explorer.rb', line 27 def compatible? compatibility == "compatible" end |
#os ⇒ Object
35 36 37 |
# File 'lib/user_agent/browsers/internet_explorer.rb', line 35 def os OperatingSystems.normalize_os(application.comment[2]) end |
#platform ⇒ Object
31 32 33 |
# File 'lib/user_agent/browsers/internet_explorer.rb', line 31 def platform "Windows" end |
#version ⇒ Object
19 20 21 |
# File 'lib/user_agent/browsers/internet_explorer.rb', line 19 def version application.comment[1].sub("MSIE ", "") end |
#version=(v) ⇒ Object
15 16 17 |
# File 'lib/user_agent/browsers/internet_explorer.rb', line 15 def version=(v) application.comment[1] = "MSIE #{v}" end |