Sha256: 7e529249a79442e2ee3322d3d43bd0bc8e78ae366571c8561ae9df023650869b

Contents?: true

Size: 401 Bytes

Versions: 4

Compression:

Stored size: 401 Bytes

Contents

# frozen_string_literal: true

module Browser
  class Edge < InternetExplorer
    def id
      :edge
    end

    def name
      "Microsoft Edge"
    end

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

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

    def chrome_based?
      match? && ua =~ /\bEdg\b/
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
browser-5.1.0 lib/browser/edge.rb
browser-5.0.0 lib/browser/edge.rb
browser-4.2.0 lib/browser/edge.rb
browser-4.1.0 lib/browser/edge.rb