Class: RubyGemsRequirementsSystem::Platform::RedHatEnterpriseLinux

Inherits:
Fedora
  • Object
show all
Defined in:
lib/rubygems-requirements-system/platform/red-hat-enterprise-linux.rb

Direct Known Subclasses

AmazonLinux2

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Fedora

#default_system_packages

Methods inherited from Base

#default_system_packages, #install

Class Method Details

.current_platform?Boolean

Returns:

  • (Boolean)


24
25
26
27
# File 'lib/rubygems-requirements-system/platform/red-hat-enterprise-linux.rb', line 24

def current_platform?
  os_release = OSRelease.new
  os_release.id_like.include?("rhel")
end

Instance Method Details

#target?(platform) ⇒ Boolean

Returns:

  • (Boolean)


30
31
32
33
34
35
36
37
38
39
# File 'lib/rubygems-requirements-system/platform/red-hat-enterprise-linux.rb', line 30

def target?(platform)
  case platform
  when "rhel"
    true
  when "redhat" # For backward compatibility
    true
  else
    super
  end
end