5 # TODO(Krzysztof Wilczynski): We need to add support for regular expression ...
6 # TODO(Krzysztof Wilczynski): Support for strings and hashes too ...
8 module Puppet::Parser::Functions
9 newfunction(:delete, :type => :rvalue, :doc => <<-EOS
10 Deletes a selected element from an array.
14 delete(['a','b','c'], 'b')
16 Would return: ['a','c']
20 if (arguments.size != 2) then
21 raise(Puppet::ParseError, "delete(): Wrong number of arguments "+
22 "given #{arguments.size} for 2")
34 # vim: set ts=2 sw=2 et :