Sha256: 28f1a5a439b616969ef9b02d4752e40b1cf2079e5906ecae1fc8d84fb77eb3b0

Contents?: true

Size: 495 Bytes

Versions: 2

Compression:

Stored size: 495 Bytes

Contents

# frozen_string_literal: true

module Browser
  class Safari < Base
    def id
      :safari
    end

    def name
      "Safari"
    end

    def full_version
      ua[%r{Version/([\d.]+)}, 1] ||
        ua[%r{Safari/([\d.]+)}, 1] ||
        ua[%r{AppleWebKit/([\d.]+)}, 1] ||
        "0.0"
    end

    def match?
      ua =~ /Safari/ &&
        ua !~ /PhantomJS|FxiOS/ &&
        !edge? &&
        !chrome? &&
        !duck_duck_go? &&
        !yandex? &&
        !sputnik?
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
browser-4.1.0 lib/browser/safari.rb
browser-4.0.0 lib/browser/safari.rb