Sha256: 29daa8c87c3de6f9fbc5e67644f61a0449698ee1c8a023c0cd42536572f52db4

Contents?: true

Size: 754 Bytes

Versions: 1

Compression:

Stored size: 754 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.include?("Safari") &&
        !platform.linux? &&
        !ua.match?(/PhantomJS|FxiOS/) &&
        !edge? &&
        !chrome? &&
        !opera? &&
        !samsung_browser? &&
        !huawei_browser? &&
        !miui_browser? &&
        !duck_duck_go? &&
        !yandex? &&
        !sputnik? &&
        !maxthon? &&
        !qq? &&
        !alipay? &&
        !sougou_browser? &&
        !google_search_app?
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
browser-6.2.0 lib/browser/safari.rb