Corrected function name from chop to strip. Moved to unless from if not

to improve code clarity.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
This commit is contained in:
Krzysztof Wilczynski 2011-04-30 02:43:13 +01:00
parent 41798020d6
commit 16eec26b0b

View file

@ -3,7 +3,7 @@
#
module Puppet::Parser::Functions
newfunction(:chop, :type => :rvalue, :doc => <<-EOS
newfunction(:strip, :type => :rvalue, :doc => <<-EOS
EOS
) do |arguments|
@ -13,8 +13,8 @@ module Puppet::Parser::Functions
value = arguments[0]
klass = value.class
if not [Array, String].include?(klass)
raise(Puppet::ParseError, 'strip(): Requires either an ' +
unless [Array, String].include?(klass)
raise(Puppet::ParseError, 'strip(): Requires either ' +
'array or string to work with')
end