Module: UserAgent::Browsers::Gecko
- Defined in:
- lib/user_agent/browsers/gecko.rb
Constant Summary collapse
- GeckoBrowsers =
%w( Firefox Camino ).freeze
Class Method Summary collapse
Instance Method Summary collapse
- #browser ⇒ Object
- #localization ⇒ Object
- #os ⇒ Object
- #platform ⇒ Object
- #security ⇒ Object
- #version ⇒ Object
Class Method Details
.extend?(agent) ⇒ Boolean
4 5 6 |
# File 'lib/user_agent/browsers/gecko.rb', line 4 def self.extend?(agent) agent.application && agent.application.product == "Mozilla" end |
Instance Method Details
#browser ⇒ Object
13 14 15 |
# File 'lib/user_agent/browsers/gecko.rb', line 13 def browser GeckoBrowsers.detect { |browser| respond_to?(browser) } || super end |
#localization ⇒ Object
33 34 35 |
# File 'lib/user_agent/browsers/gecko.rb', line 33 def localization application.comment[3] end |
#os ⇒ Object
29 30 31 |
# File 'lib/user_agent/browsers/gecko.rb', line 29 def os OperatingSystems.normalize_os(application.comment[2]) end |
#platform ⇒ Object
21 22 23 |
# File 'lib/user_agent/browsers/gecko.rb', line 21 def platform application.comment[0] end |
#security ⇒ Object
25 26 27 |
# File 'lib/user_agent/browsers/gecko.rb', line 25 def security Security[application.comment[1]] end |
#version ⇒ Object
17 18 19 |
# File 'lib/user_agent/browsers/gecko.rb', line 17 def version send(browser).version || super end |