Puppet Function: gen_target_path
- Defined in:
- lib/puppet/parser/functions/gen_target_path.rb
- Function type:
- Ruby 3.x API
Overview
2 3 4 5 6 7 8 9 10 11 |
# File 'lib/puppet/parser/functions/gen_target_path.rb', line 2 newfunction(:gen_target_path, :type => :rvalue) do |arguments| source_dir = arguments[0] filepath = arguments[1] index = filepath.rindex('/')+1 filename = filepath[index..-1] fullpath = source_dir+'/'+filename return fullpath end |