5 module Puppet::Parser::Functions
6 newfunction(:rstrip, :type => :rvalue, :doc => <<-EOS
7 Strips leading spaces to the right of the string.
11 raise(Puppet::ParseError, "rstrip(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
15 unless value.is_a?(Array) || value.is_a?(String)
16 raise(Puppet::ParseError, 'rstrip(): Requires either array or string to work with')
20 result = value.collect { |i| i.is_a?(String) ? i.rstrip : i }
29 # vim: set ts=2 sw=2 et :