Sha256: 71882073c9cf26a25da6984b2fb3d5fde05bc9e6b5c2159e751e45cdf8d649c6

Contents?: true

Size: 372 Bytes

Versions: 46

Compression:

Stored size: 372 Bytes

Contents

# frozen_string_literal: true

module LicenseFinder
  module Platform
    def self.darwin?
      RUBY_PLATFORM =~ /darwin/
    end

    def self.windows?
      # SO: What is the correct way to detect if ruby is running on Windows?,
      # cf. https://stackoverflow.com/a/21468976/2592915
      Gem.win_platform? || RUBY_PLATFORM =~ /mswin|cygwin|mingw/
    end
  end
end

Version data entries

46 entries across 46 versions & 2 rubygems

Version Path
license_finder-5.6.2 lib/license_finder/platform.rb
license_finder-5.6.1 lib/license_finder/platform.rb
license_finder-5.6.0 lib/license_finder/platform.rb
license_finder-5.5.2 lib/license_finder/platform.rb
license_finder-5.5.1 lib/license_finder/platform.rb
license_finder-5.5.0 lib/license_finder/platform.rb