Class: NativePackageInstaller::OSRelease
- Inherits:
-
Object
- Object
- NativePackageInstaller::OSRelease
- Includes:
- Enumerable
- Defined in:
- lib/native-package-installer/os-release.rb
Instance Method Summary collapse
- #[](key) ⇒ Object
- #each(&block) ⇒ Object
- #id ⇒ Object
- #id_like ⇒ Object
-
#initialize ⇒ OSRelease
constructor
A new instance of OSRelease.
Constructor Details
#initialize ⇒ OSRelease
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 |
#id ⇒ Object
32 33 34 |
# File 'lib/native-package-installer/os-release.rb', line 32 def id self["ID"] end |
#id_like ⇒ Object
36 37 38 |
# File 'lib/native-package-installer/os-release.rb', line 36 def id_like (self["ID_LIKE"] || "").split(/ /) end |