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
# File 'lib/native-package-installer/platform/fedora.rb', line 22

def current_platform?
  File.exist?("/etc/fedora-release")
end

Instance Method Details

#install_commandObject


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

def install_command
  "dnf install -y"
end

#need_super_user_priviledge?Boolean

Returns:

  • (Boolean)

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

def need_super_user_priviledge?
  true
end

#package(spec) ⇒ Object


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

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