Sha256: 2325883e4238c57dd9ba77fbff9355e43415fb24e40483a95a9594d2a12d7708
Contents?: true
Size: 549 Bytes
Versions: 9
Compression:
Stored size: 549 Bytes
Contents
# frozen_string_literal: true module PuppetfileResolver module Cache class Base def initialize(*_) @inmemory = {} end def exist?(name) @inmemory.key?(name) end def load(name) @inmemory[name] end def save(name, value, persist = false) @inmemory[name] = value persist(name, value) if persist end def persist(_name, content_string) raise 'Can only persist String data types' unless content_string.is_a?(String) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems