summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Wilczynski <krzysztof.wilczynski@linux.com>2011-04-30 02:43:13 +0100
committerKrzysztof Wilczynski <krzysztof.wilczynski@linux.com>2011-04-30 02:43:13 +0100
commit16eec26b0b2e671600ff048c54263adf032af5fd (patch)
tree0c17aa69191c7ef7db8141704ccaf6637e30fdf8
parent41798020d6620a58b0f5a9aa8fa467512aa3fecc (diff)
downloadpuppet-stdlib-16eec26b0b2e671600ff048c54263adf032af5fd.tar.gz
puppet-stdlib-16eec26b0b2e671600ff048c54263adf032af5fd.tar.bz2
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>
-rw-r--r--strip.rb6
1 files 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