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