Sha256: 5228cbfd69392b699295bfb9c93da9551882bf91b53ff36a639216fb8b51018d

Contents?: true

Size: 523 Bytes

Versions: 2

Compression:

Stored size: 523 Bytes

Contents

module Specinfra
  class HostInventory
    EXTRA_KEYS = %w(package user group)

    def self.inventory_keys
      KEYS + EXTRA_KEYS
    end

    def each
      inventory_keys.each do |k|
        yield k, self[k]
      end
    end

    def each_key
      inventory_keys.each do |k|
        yield k
      end
    end

    def each_value
      inventory_keys.each do |k|
        yield self[k]
      end
    end
  end
end

Specinfra::HostInventory::EXTRA_KEYS.each do |k|
  require "koma/ext/specinfra/host_inventory/#{k}"
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
koma-0.2.0 lib/koma/ext/specinfra/host_inventory.rb
koma-0.1.0 lib/koma/ext/specinfra/host_inventory.rb