Sha256: 7801ad222951f5d5b849e0df1d6b57cfd3e694574504e0f57ebd60246ab1d86f

Contents?: true

Size: 733 Bytes

Versions: 1

Compression:

Stored size: 733 Bytes

Contents

module Koma
  class HostInventory
    EXTRA_KEYS = %w(package group service)
    DISABLED_KEYS = %w(ec2)

    def self.inventory_keys
      Specinfra::HostInventory::KEYS + EXTRA_KEYS - DISABLED_KEYS
    end

    def self.all_inventory_keys
      Specinfra::HostInventory::KEYS + EXTRA_KEYS
    end

    def self.disabled_keys
      DISABLED_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

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
koma-0.13.0 lib/koma/host_inventory.rb