Moved to unless from if not and removed TODO.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
This commit is contained in:
parent
555c50d735
commit
551f4ce95b
1 changed files with 2 additions and 4 deletions
6
empty.rb
6
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue