summaryrefslogtreecommitdiff
path: root/count.rb
diff options
context:
space:
mode:
authorKrzysztof Wilczynski <krzysztof.wilczynski@linux.com>2011-04-29 23:30:32 +0100
committerKrzysztof Wilczynski <krzysztof.wilczynski@linux.com>2011-04-29 23:30:32 +0100
commit0ff8b00a64426acf96d0659d1cbc1f67bba842f4 (patch)
tree34c846c222a34df5059e618be48a3585d9a78458 /count.rb
parent726746649e38615b69aa372ec978b2ffa39b89d5 (diff)
Small re-factor. Changed if not to unless for code clarity.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
Diffstat (limited to 'count.rb')
-rw-r--r--count.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/count.rb b/count.rb
index 9ea4033..e4bf22e 100644
--- a/count.rb
+++ b/count.rb
@@ -16,8 +16,8 @@ module Puppet::Parser::Functions
array = arguments[0]
- if not array.is_a?(Array)
- raise(Puppet::ParseError, 'count(): Requires an array to work with')
+ unless array.is_a?(Array)
+ raise(Puppet::ParseError, 'count(): Requires array to work with')
end
item = arguments[1] if arguments[1]