Class: NativePackageInstaller::Platform::Fedora

Inherits:
Object
  • Object
show all
Defined in:
lib/native-package-installer/platform/fedora.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.current_platform?Boolean

Returns:

  • (Boolean)


22
23
24
25
# File 'lib/native-package-installer/platform/fedora.rb', line 22

def current_platform?
  os_release = OSRelease.new
  os_release.id == "fedora"
end

Instance Method Details

#install_commandObject



32
33
34
# File 'lib/native-package-installer/platform/fedora.rb', line 32

def install_command
  "dnf install -y"
end

#need_super_user_priviledge?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/native-package-installer/platform/fedora.rb', line 36

def need_super_user_priviledge?
  true
end

#package(spec) ⇒ Object



28
29
30
# File 'lib/native-package-installer/platform/fedora.rb', line 28

def package(spec)
  spec[:fedora] || spec[:rhel] || spec[:redhat]
end