File: template_body.rb

package info (click to toggle)
puppet-module-richardc-datacat 0.6.2-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 208 kB
  • sloc: ruby: 417; sh: 10; makefile: 4
file content (8 lines) | stat: -rw-r--r-- 318 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
Puppet::Parser::Functions::newfunction(:template_body, :type => :rvalue) do |args|
  args.collect do |file|
    unless filename = Puppet::Parser::Files.find_template(file, self.compiler.environment)
      raise Puppet::ParseError, "Could not find template '#{file}'"
    end
    File.read(filename)
  end.join('')
end