diff options
author | Krzysztof Wilczynski <krzysztof.wilczynski@linux.com> | 2011-04-30 00:58:37 +0100 |
---|---|---|
committer | Krzysztof Wilczynski <krzysztof.wilczynski@linux.com> | 2011-04-30 00:58:37 +0100 |
commit | 551f4ce95b5a7b141d40e654026ff3b000481096 (patch) | |
tree | 75eae8afc3ebda0e5deafbf5e92dcc15eb304eda | |
parent | 555c50d73595478a8a422b83d073514f7dbed0f0 (diff) |
Moved to unless from if not and removed TODO.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
-rw-r--r-- | empty.rb | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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 |