Sha256: e4398ee0e68a24bfbb23f8b6a232bbd789a0cf50d5cc6f054496d908d939126e
Contents?: true
Size: 402 Bytes
Versions: 43
Compression:
Stored size: 402 Bytes
Contents
module Specinfra class HostInventory include Singleton def initialize property[:host_inventory] ||= {} @inventory = property[:host_inventory] end def [](key) @inventory[key.to_sym] ||= {} if @inventory[key.to_sym].empty? @inventory[key.to_sym] = Specinfra::Runner.send("get_inventory_#{key}") end @inventory[key.to_sym] end end end
Version data entries
43 entries across 43 versions & 1 rubygems