Class: Browser::Unknown

Inherits:
Base
  • Object
show all
Defined in:
lib/browser/unknown.rb

Constant Summary collapse

NAMES =
{
  "QuickTime" => "QuickTime",
  "CoreMedia" => "Apple CoreMedia"
}.freeze

Instance Attribute Summary

Attributes inherited from Base

#ua

Instance Method Summary collapse

Methods inherited from Base

#accept_language, #alipay?, #bot, #bot?, #chrome?, #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_versionObject



18
19
20
21
22
# File 'lib/browser/unknown.rb', line 18

def full_version
  ua[%r{(?:QuickTime)/([\d.]+)}, 1] ||
    ua[/CoreMedia v([\d.]+)/, 1] ||
    "0.0"
end

#idObject



10
11
12
# File 'lib/browser/unknown.rb', line 10

def id
  :unknown_browser
end

#match?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/browser/unknown.rb', line 24

def match?
  true
end

#nameObject



14
15
16
# File 'lib/browser/unknown.rb', line 14

def name
  infer_name || "Unknown Browser"
end