Class: Browser::QQ
Instance Attribute Summary
Attributes inherited from Base
#accept_language, #ua
Instance Method Summary
collapse
Methods inherited from Base
#alipay?, #bot, #bot?, #chrome?, #compatibility_view?, #core_media?, #device, #edge?, #electron?, #facebook?, #firefox?, #ie?, #initialize, #known?, #meta, #micro_messenger?, #modern?, #msie_full_version, #msie_version, #nokia?, #opera?, #opera_mini?, #otter?, #phantom_js?, #platform, #proxy?, #quicktime?, #safari?, #safari_webapp_mode?, #to_s, #uc_browser?, #version, #webkit?, #webkit_full_version, #weibo?, #yandex?
Constructor Details
This class inherits a constructor from Browser::Base
Instance Method Details
#full_version ⇒ Object
13
14
15
16
17
18
19
|
# File 'lib/browser/qq.rb', line 13
def full_version
ua[%r[(?:Mobile MQQBrowser)/([\d.]+)]i, 1] ||
ua[%r[(?:QQBrowserLite)/([\d.]+)]i, 1] ||
ua[%r[(?:QQBrowser)/([\d.]+)]i, 1] ||
ua[%r[(?:QQ)/([\d.]+)]i, 1] ||
"0.0"
end
|
#id ⇒ Object
5
6
7
|
# File 'lib/browser/qq.rb', line 5
def id
:qq
end
|
#match? ⇒ Boolean
21
22
23
|
# File 'lib/browser/qq.rb', line 21
def match?
ua =~ /QQ/i
end
|
#name ⇒ Object
9
10
11
|
# File 'lib/browser/qq.rb', line 9
def name
"QQ Browser"
end
|