Sha256: f8db552f9efd7b06b2ca5c363101096f4e7a1fb96147e368d80ad56f34cd17d6
Contents?: true
Size: 524 Bytes
Versions: 5
Compression:
Stored size: 524 Bytes
Contents
require 'puppet/indirector/terminus' # Manage a memory-cached list of instances. class Puppet::Indirector::Memory < Puppet::Indirector::Terminus def initialize @instances = {} end def destroy(instance) raise ArgumentError.new("Could not find %s to destroy" % instance) unless @instances.include?(instance.name) @instances.delete(instance.name) end def find(name) @instances[name] end def save(instance) @instances[instance.name] = instance end end
Version data entries
5 entries across 5 versions & 1 rubygems