Class: Facter::Util::Slurm
- Inherits:
-
Object
- Object
- Facter::Util::Slurm
- Defined in:
- lib/facter/util/slurm.rb
Overview
SLURM fact util class
Class Method Summary collapse
- .get_fact(fact) ⇒ Object
-
.read_procfs(path) ⇒ String
private
Reads the contents of path in procfs.
Class Method Details
.get_fact(fact) ⇒ Object
15 16 17 |
# File 'lib/facter/util/slurm.rb', line 15 def self.get_fact(fact) Facter.value(fact) end |
.read_procfs(path) ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Reads the contents of path in procfs
8 9 10 11 12 13 |
# File 'lib/facter/util/slurm.rb', line 8 def self.read_procfs(path) output = nil output = Facter::Util::Resolution.exec(['cat ', path].join) if File.exist?(path) return nil if output.nil? output.strip end |