Class: Koma::HostInventory
- Inherits:
-
Object
- Object
- Koma::HostInventory
- Defined in:
- lib/koma/host_inventory.rb
Constant Summary collapse
- EXTRA_KEYS =
%w(package service)
- DISABLED_KEYS =
%w(ec2)
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.all_inventory_keys ⇒ Object
10 11 12 |
# File 'lib/koma/host_inventory.rb', line 10 def self.all_inventory_keys Specinfra::HostInventory::KEYS + EXTRA_KEYS end |
.disabled_keys ⇒ Object
14 15 16 |
# File 'lib/koma/host_inventory.rb', line 14 def self.disabled_keys DISABLED_KEYS end |
.inventory_keys ⇒ Object
6 7 8 |
# File 'lib/koma/host_inventory.rb', line 6 def self.inventory_keys Specinfra::HostInventory::KEYS + EXTRA_KEYS - DISABLED_KEYS end |
Instance Method Details
#each ⇒ Object
18 19 20 21 22 |
# File 'lib/koma/host_inventory.rb', line 18 def each inventory_keys.each do |k| yield k, self[k] end end |
#each_key ⇒ Object
24 25 26 27 28 |
# File 'lib/koma/host_inventory.rb', line 24 def each_key inventory_keys.each do |k| yield k end end |
#each_value ⇒ Object
30 31 32 33 34 |
# File 'lib/koma/host_inventory.rb', line 30 def each_value inventory_keys.each do |k| yield self[k] end end |