From 551f4ce95b5a7b141d40e654026ff3b000481096 Mon Sep 17 00:00:00 2001 From: Krzysztof Wilczynski Date: Sat, 30 Apr 2011 00:58:37 +0100 Subject: Moved to unless from if not and removed TODO. Signed-off-by: Krzysztof Wilczynski --- empty.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/empty.rb b/empty.rb index 1db9b63..e78ebf0 100644 --- a/empty.rb +++ b/empty.rb @@ -2,8 +2,6 @@ # empty.rb # -# TODO(Krzysztof Wilczynski): Support for hashes would be nice too ... - module Puppet::Parser::Functions newfunction(:empty, :type => :rvalue, :doc => <<-EOS EOS @@ -15,8 +13,8 @@ module Puppet::Parser::Functions value = arguments[0] klass = value.class - if not [Array, Hash, String].include?(klass) - raise(Puppet::ParseError, 'empty(): Requires either an ' + + unless [Array, Hash, String].include?(klass) + raise(Puppet::ParseError, 'empty(): Requires either ' + 'array, hash or string to work with') end -- cgit v1.2.3