projects
/
mirror
/
dsa-puppet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Note that exim contains tracker-specific configuration
[mirror/dsa-puppet.git]
/
parser
/
functions
/
getfromhash.rb
1
module Puppet::Parser::Functions
2
newfunction(:getfromhash, :type => :rvalue) do |args|
3
h = args.shift
4
key = args.shift
5
6
raise Puppet::ParseError, "argument is not a hash" unless h.kind_of?(Hash)
7
if h.has_key?(key)
8
ans = h[key]
9
else
10
ans = false
11
end
12
13
return ans
14
end
15
end
16
# vim:set et:
17
# vim:set sts=2 ts=2:
18
# vim:set shiftwidth=2: