Added basename and dirname functions.

This commit is contained in:
Timo Mkinen 2012-04-20 12:27:43 +03:00
parent eb0fb28ea2
commit e8788f51bf
2 changed files with 12 additions and 0 deletions

View file

@ -0,0 +1,6 @@
module Puppet::Parser::Functions
newfunction(:basename, :type => :rvalue) do |args|
File.basename(args[0])
end
end

View file

@ -0,0 +1,6 @@
module Puppet::Parser::Functions
newfunction(:dirname, :type => :rvalue) do |args|
File.dirname(args[0])
end
end