diff options
Diffstat (limited to 'files/functions/dirname.rb')
-rwxr-xr-x | files/functions/dirname.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/files/functions/dirname.rb b/files/functions/dirname.rb new file mode 100755 index 0000000..3f784ac --- /dev/null +++ b/files/functions/dirname.rb @@ -0,0 +1,7 @@ +# get the directory corresponding to this filename +module Puppet::Parser::Functions + newfunction(:dirname, :type => :rvalue) do |args| + File.dirname(args[0]) + end +end + |