4 module Puppet::Parser::Functions
5 newfunction(:keys, :type => :rvalue, :doc => <<-DOC
6 Returns the keys of a hash as an array.
8 Note: from Puppet 5.5.0, the compatible function with the same name in Puppet core
9 will be used instead of this function.
13 raise(Puppet::ParseError, "keys(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.empty?
17 unless hash.is_a?(Hash)
18 raise(Puppet::ParseError, 'keys(): Requires hash to work with')
27 # vim: set ts=2 sw=2 et :