Class: NativePackageInstaller::OSRelease

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/native-package-installer/os-release.rb

Instance Method Summary collapse

Constructor Details

#initializeOSRelease

Returns a new instance of OSRelease.



20
21
22
# File 'lib/native-package-installer/os-release.rb', line 20

def initialize
  parse
end

Instance Method Details

#[](key) ⇒ Object



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

def [](key)
  @variables[key]
end

#each(&block) ⇒ Object



24
25
26
# File 'lib/native-package-installer/os-release.rb', line 24

def each(&block)
  @variables.each(&block)
end

#idObject



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

def id
  self["ID"]
end

#id_likeObject



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

def id_like
  (self["ID_LIKE"] || "").split(/ /)
end