Sha256: ebe56002a4a21c19c4fa60cdcea7dfd48b984102a5885887bfa610c180e32b1b

Contents?: true

Size: 405 Bytes

Versions: 5

Compression:

Stored size: 405 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 !~ /Chrome|CriOS|PhantomJS|FxiOS|YaBrowser/
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
browser-3.0.3 lib/browser/safari.rb
browser-3.0.2 lib/browser/safari.rb
browser-3.0.1 lib/browser/safari.rb
browser-3.0.0 lib/browser/safari.rb
browser-2.7.1 lib/browser/safari.rb