Puppet Function: hash_keys
- Defined in:
- lib/puppet/parser/functions/hash_keys.rb
- Function type:
- Ruby 3.x API
Overview
3 4 5 6 7 8 9 10 11 |
# File 'lib/puppet/parser/functions/hash_keys.rb', line 3 newfunction(:hash_keys, :type => :rvalue) do |args| raise Puppet::ParseError, "hash_keys(): requires 1 argument, got #{args.length}" if args.length != 1 hash = args.shift raise Puppet::ParseError, "hash_keys(): Argument is not an hash" unless hash.is_a?(Hash) hash.keys end |