Class: RubyGemsRequirementsSystem::Platform::MSYS2

Inherits:
Base
  • Object
show all
Defined in:
lib/rubygems-requirements-system/platform/msys2.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#default_system_packages, #initialize, #install, #valid_system_package?, #valid_system_repository?

Constructor Details

This class inherits a constructor from RubyGemsRequirementsSystem::Platform::Base

Class Method Details

.current_platform?Boolean

Returns:

  • (Boolean)


24
25
26
27
28
# File 'lib/rubygems-requirements-system/platform/msys2.rb', line 24

def current_platform?
  return false if Object.const_defined?(:RubyInstaller)
  return false if package_prefix.nil?
  ExecutableFinder.exist?("pacman")
end

.package_prefixObject



30
31
32
# File 'lib/rubygems-requirements-system/platform/msys2.rb', line 30

def package_prefix
  ENV["MINGW_PACKAGE_PREFIX"]
end

Instance Method Details

#target?(platform) ⇒ Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/rubygems-requirements-system/platform/msys2.rb', line 35

def target?(platform)
  platform == "msys2"
end