Sha256: 19e97a66d8987d4bcbd645bdf55b482fb09d2d35547e25930e8cfd685cedfbda

Contents?: true

Size: 632 Bytes

Versions: 5

Compression:

Stored size: 632 Bytes

Contents

require 'koma/ext/specinfra/host_inventory/base'
require 'koma/ext/specinfra/host_inventory/parser'

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

    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

5 entries across 5 versions & 1 rubygems

Version Path
koma-0.6.0 lib/koma/ext/specinfra/host_inventory.rb
koma-0.5.0 lib/koma/ext/specinfra/host_inventory.rb
koma-0.4.0 lib/koma/ext/specinfra/host_inventory.rb
koma-0.3.1 lib/koma/ext/specinfra/host_inventory.rb
koma-0.3.0 lib/koma/ext/specinfra/host_inventory.rb