Class: Browser::Edge

Inherits:
InternetExplorer show all
Defined in:
lib/browser/edge.rb

Constant Summary

Constants inherited from InternetExplorer

InternetExplorer::TRIDENT_MAPPING

Instance Attribute Summary

Attributes inherited from Base

#ua

Instance Method Summary collapse

Methods inherited from InternetExplorer

#compatibility_view?, #msie_full_version, #msie_version

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

#chromium_based?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/browser/edge.rb', line 21

def chromium_based?
  match? && ua.match?(/\bEdg\b/)
end

#full_versionObject



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

def full_version
  ua[%r{(?:Edge|Edg|EdgiOS|EdgA)/([\d.]+)}, 1] || super
end

#idObject



5
6
7
# File 'lib/browser/edge.rb', line 5

def id
  :edge
end

#match?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/browser/edge.rb', line 17

def match?
  ua.match?(%r{((?:Edge|Edg|EdgiOS|EdgA)/[\d.]+|Trident/8)})
end

#nameObject



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

def name
  "Microsoft Edge"
end