Sha256: 6f271e43ec56c794b1677e9a2cf2f7a1281cce629aff1e00360da7b32fe36142
Contents?: true
Size: 470 Bytes
Versions: 12
Compression:
Stored size: 470 Bytes
Contents
# frozen_string_literal: true module Facter module Util module Aix module InfoExtractor MEGABYTES_EXPONENT = 1024**2 GIGABYTES_EXPONENT = 1024**3 def self.extract(content, regex) content = content.each_line.map do |line| next unless regex =~ line line.split(/:\s*|\s{2,}/) end content.flatten!.reject!(&:nil?) Hash[*content] end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems