Parent Directory | Revision Log
mga-common: add hash_keys function This function takes a hash as argument and return the hash keys as a list.
1 | module Puppet::Parser::Functions |
2 | newfunction(:hash_keys, :type => :rvalue) do |args| |
3 | unless args[0].is_a?(Hash) |
4 | Puppet.warning "hash_keys takes one argument, the input hash" |
5 | nil |
6 | else |
7 | args[0].keys |
8 | end |
9 | end |
10 | end |
ViewVC Help | |
Powered by ViewVC 1.1.30 |