Added function that checks if given value is array.

This commit is contained in:
Timo Mkinen 2013-05-07 22:19:50 +03:00
parent 79c74e6152
commit 0b5f9681fa

View file

@ -0,0 +1,8 @@
module Puppet::Parser::Functions
newfunction(:is_array, :type => :rvalue) do |args|
if args.length != 1
raise Puppet::ParseError, ("is_array(): wrong number of arguments (#{args.length}; must be 2)")
end
args[0].is_a?(Array)
end
end