Sha256: 87d9c0d016368e25db228907c9f96199ac378f97ef5c5dc79f7d3c3a5858d0e1

Contents?: true

Size: 389 Bytes

Versions: 3

Compression:

Stored size: 389 Bytes

Contents

class Specinfra::HostInventory::Parser::Redhat::Base::Package < Specinfra::HostInventory::Parser::Linux::Package
  class << self
    def parse(cmd_ret)
      packages = {}
      lines = cmd_ret.split(/\n/)
      lines.each do |line|
        h = Hash[line.split("\t").map { |f| f.split(':', 2) }]
        idx = h['name']
        packages[idx] = h
      end
      packages
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
koma-0.17.0 lib/koma/ext/specinfra/host_inventory/parser/redhat/base/package.rb
koma-0.16.0 lib/koma/ext/specinfra/host_inventory/parser/redhat/base/package.rb
koma-0.15.0 lib/koma/ext/specinfra/host_inventory/parser/redhat/base/package.rb