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
38 39 40 41 42 43 44 45 46 |
# File 'lib/user_agent/browsers/opera.rb', line 38 def localization if application.comment.nil? nil elsif platform == "Macintosh" application.comment[3] else application.comment[2] end end |
#os ⇒ Object
28 29 30 31 32 33 34 35 36 |
# File 'lib/user_agent/browsers/opera.rb', line 28 def os if application.comment.nil? nil elsif 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 15 16 |
# File 'lib/user_agent/browsers/opera.rb', line 8 def platform if application.comment.nil? nil elsif application.comment[0] =~ /Windows/ "Windows" else application.comment[0] end end |