Class: Crowbar::Client::Util::OsRelease
- Inherits:
-
Object
- Object
- Crowbar::Client::Util::OsRelease
- Defined in:
- lib/crowbar/client/util/osrelease.rb
Class Method Summary collapse
Class Method Details
.fields ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/crowbar/client/util/osrelease.rb', line 22 def fields os_release_file = "/etc/os-release" if File.exist?(os_release_file) return Hash[ File.open(os_release_file).read.scan(/(\S+)\s*=\s*"([^"]+)/) ] end {} end |