Class: Browser::Generic

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

Constant Summary collapse

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

Instance Attribute Summary

Attributes inherited from Base

#accept_language, #ua

Instance Method Summary collapse

Methods inherited from Base

#bot, #bot?, #chrome?, #compatibility_view?, #core_media?, #device, #edge?, #firefox?, #ie?, #initialize, #known?, #meta, #micro_messenger?, #modern?, #msie_full_version, #msie_version, #nokia?, #opera?, #opera_mini?, #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_versionObject



17
18
19
20
21
# File 'lib/browser/generic.rb', line 17

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

#idObject



9
10
11
# File 'lib/browser/generic.rb', line 9

def id
  :generic
end

#match?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/browser/generic.rb', line 23

def match?
  true
end

#nameObject



13
14
15
# File 'lib/browser/generic.rb', line 13

def name
  infer_name || "Generic Browser"
end