module-common/plugins/puppet/parser/functions/basename.rb

8 lines
161 B
Ruby
Raw Normal View History

# get the basename of the given filename
module Puppet::Parser::Functions
newfunction(:basename, :type => :rvalue) do |args|
File.basename(args[0])
end
end