diff options
author | Krzysztof Wilczynski <krzysztof.wilczynski@linux.com> | 2011-04-30 02:43:13 +0100 |
---|---|---|
committer | Krzysztof Wilczynski <krzysztof.wilczynski@linux.com> | 2011-04-30 02:43:13 +0100 |
commit | 16eec26b0b2e671600ff048c54263adf032af5fd (patch) | |
tree | 0c17aa69191c7ef7db8141704ccaf6637e30fdf8 | |
parent | 41798020d6620a58b0f5a9aa8fa467512aa3fecc (diff) | |
download | puppet-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.rb | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |