Sha256: d417797701e196f50fc5e36d404da82b850b93e28e89bc4fb34712758549d1fd

Contents?: true

Size: 382 Bytes

Versions: 5

Compression:

Stored size: 382 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
        return "macOS" if platform.mac?(">= 10.12")

        "Mac OS X"
      end

      def id
        :mac
      end

      def match?
        ua.include?("Mac")
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
browser-6.1.0 lib/browser/platform/mac.rb
browser-6.0.0 lib/browser/platform/mac.rb
browser-5.3.1 lib/browser/platform/mac.rb
browser-5.3.0 lib/browser/platform/mac.rb
browser-5.2.0 lib/browser/platform/mac.rb