Sha256: 381dc409dfb061055b574207ebcaf90bdba66e8c85ff5fbff7f77745eb8d8387

Contents?: true

Size: 394 Bytes

Versions: 7

Compression:

Stored size: 394 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/
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/browser-2.3.0/lib/browser/safari.rb
browser-2.3.0 lib/browser/safari.rb
browser-2.2.0 lib/browser/safari.rb
browser-2.1.0 lib/browser/safari.rb
browser-2.0.3 lib/browser/safari.rb
browser-2.0.2 lib/browser/safari.rb
browser-2.0.1 lib/browser/safari.rb