Sha256: fca437e3e31431f8ddf4b3ca468521b2f5d5e5cc9b49e952ea61cfbde986dbef
Contents?: true
Size: 376 Bytes
Versions: 37
Compression:
Stored size: 376 Bytes
Contents
require 'itamae' require 'erb' require 'tempfile' module Itamae module Resource class Template < File define_attribute :source, type: String, required: true def pre_action src = ::File.expand_path(source, ::File.dirname(@recipe.path)) content(ERB.new(::File.read(src), nil, '-').result(binding)) super end end end end
Version data entries
37 entries across 37 versions & 1 rubygems