Module: UserAgent::Browsers::Opera
- Defined in:
- lib/user_agent/browsers/opera.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.extend?(agent) ⇒ Boolean
4 5 6 |
# File 'lib/user_agent/browsers/opera.rb', line 4 def self.extend?(agent) agent.application && agent.application.product == "Opera" end |
Instance Method Details
#localization ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/user_agent/browsers/opera.rb', line 32 def localization if platform == "Macintosh" application.comment[3] else application.comment[2] end end |
#os ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/user_agent/browsers/opera.rb', line 24 def os if application.comment[0] =~ /Windows/ OperatingSystems.normalize_os(application.comment[0]) else application.comment[1] end end |
#platform ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/user_agent/browsers/opera.rb', line 8 def platform if application.comment[0] =~ /Windows/ "Windows" else application.comment[0] end end |