Sha256: dd8a303ed7014fe7a27a68dab60b0cfa549eda69a5d5794400d110dec718424a

Contents?: true

Size: 324 Bytes

Versions: 13

Compression:

Stored size: 324 Bytes

Contents

# frozen_string_literal: true

module Browser
  class Platform
    class Mac < Base
      def version
        (ua[/Mac OS X\s*([0-9_\.]+)?/, 1] || "0").tr("_", ".")
      end

      def name
        "Macintosh"
      end

      def id
        :mac
      end

      def match?
        ua =~ /Mac/
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
browser-3.0.3 lib/browser/platform/mac.rb
browser-3.0.2 lib/browser/platform/mac.rb
browser-3.0.1 lib/browser/platform/mac.rb
browser-3.0.0 lib/browser/platform/mac.rb
browser-2.7.1 lib/browser/platform/mac.rb
browser-2.7.0 lib/browser/platform/mac.rb
browser-2.6.1 lib/browser/platform/mac.rb
browser-2.6.0 lib/browser/platform/mac.rb
browser-2.5.3 lib/browser/platform/mac.rb
browser-2.5.2 lib/browser/platform/mac.rb
browser-2.5.1 lib/browser/platform/mac.rb
browser-2.5.0 lib/browser/platform/mac.rb
browser-2.4.0 lib/browser/platform/mac.rb