From 16eec26b0b2e671600ff048c54263adf032af5fd Mon Sep 17 00:00:00 2001 From: Krzysztof Wilczynski Date: Sat, 30 Apr 2011 02:43:13 +0100 Subject: Corrected function name from chop to strip. Moved to unless from if not to improve code clarity. Signed-off-by: Krzysztof Wilczynski --- strip.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/strip.rb b/strip.rb index 1bb5c0a..ebab20e 100644 --- a/strip.rb +++ b/strip.rb @@ -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 -- cgit v1.2.3