Sha256: 06e60fe613a961d1c15762fdf345c4f7cbe8c45fb154dba0e48cae8abaf28a83
Contents?: true
Size: 425 Bytes
Versions: 6
Compression:
Stored size: 425 Bytes
Contents
require 'tempfile' require 'erb' OVERLAY_CACHE = File.expand_path(File.join(File.dirname(__FILE__),'overlays')) def overlay_cache_path(&block) file = Tempfile.new('overlays.yaml') path = file.path template_path = File.join(File.dirname(__FILE__),'overlays.yaml.erb') template = ERB.new(File.read(template_path)) file.write(template.result(binding)) file.close block.call(path) if block return path end
Version data entries
6 entries across 6 versions & 1 rubygems