Methods

Class/Module Index [+]

Quicksearch

Facter::Util::Parser::KeyValuePairOutputFormat

Public Class Methods

parse(output) click to toggle source
# File lib/facter/util/parser.rb, line 70
def self.parse(output)
  result = {}
  re = /^(.+?)=(.+)$/
  output.each_line do |line|
    if match_data = re.match(line.chomp)
      result[match_data[1]] = match_data[2]
    end
  end
  result
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.