Class: Browser::SougouBrowser
- Defined in:
- lib/browser/sougou_browser.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#full_version ⇒ Object
We can’t get the real version on desktop device from the ua string.
- #id ⇒ Object
-
#match? ⇒ Boolean
SogouMobileBrowser for mobile device SE for desktop device.
- #name ⇒ Object
Methods inherited from Base
#accept_language, #alipay?, #bot, #bot?, #chrome?, #chromium_based?, #compatibility_view?, #core_media?, #device, #duck_duck_go?, #edge?, #electron?, #facebook?, #firefox?, #google_search_app?, #huawei_browser?, #ie?, #initialize, #instagram?, #known?, #maxthon?, #meta, #micro_messenger?, #miui_browser?, #msie_full_version, #msie_version, #nokia?, #opera?, #opera_mini?, #otter?, #phantom_js?, #platform, #proxy?, #qq?, #quicktime?, #safari?, #safari_webapp_mode?, #samsung_browser?, #snapchat?, #sougou_browser?, #sputnik?, #to_s, #uc_browser?, #unknown?, #version, #webkit?, #webkit_full_version, #weibo?, #yandex?
Constructor Details
This class inherits a constructor from Browser::Base
Instance Method Details
#full_version ⇒ Object
We can’t get the real version on desktop device from the ua string
14 15 16 |
# File 'lib/browser/sougou_browser.rb', line 14 def full_version ua[%r{(?:SogouMobileBrowser)/([\d.]+)}, 1] || "0.0" end |
#id ⇒ Object
5 6 7 |
# File 'lib/browser/sougou_browser.rb', line 5 def id :sougou_browser end |
#match? ⇒ Boolean
SogouMobileBrowser for mobile device SE for desktop device
20 21 22 |
# File 'lib/browser/sougou_browser.rb', line 20 def match? ua.match?(/SogouMobileBrowser/i) || ua.match?(/\bSE\b/) end |
#name ⇒ Object
9 10 11 |
# File 'lib/browser/sougou_browser.rb', line 9 def name "Sougou Browser" end |