5 module Puppet::Parser::Functions
6 newfunction(:sort, :type => :rvalue, :doc => <<-EOS
7 Sorts strings and arrays lexically.
11 if (arguments.size != 1) then
12 raise(Puppet::ParseError, "sort(): Wrong number of arguments "+
13 "given #{arguments.size} for 1")
18 if value.is_a?(Array) then
20 elsif value.is_a?(String) then
21 value.split("").sort.join("")
27 # vim: set ts=2 sw=2 et :