Sha256: 558a02be070c2f011ff73848c1c9f1f21366863ee522c93b09dc6dd46fec973b
Contents?: true
Size: 468 Bytes
Versions: 39
Compression:
Stored size: 468 Bytes
Contents
# frozen_string_literal: true module ViewComponent # Keeps track of which templates have already been compiled # This is not part of the public API module CompileCache mattr_accessor :cache, instance_reader: false, instance_accessor: false do Set.new end module_function def register(klass) cache << klass end def compiled?(klass) cache.include? klass end def invalidate! cache.clear end end end
Version data entries
39 entries across 39 versions & 1 rubygems