blob: 5643ac245a85b390f42873ec5cd98c0f570d2348 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# Where we store helper methods related to, um, methods.
module Puppet::Util::MethodHelper
# Take a hash and convert all of the keys to symbols if possible.
def symbolize_options(options)
options.inject({}) do |hash, opts|
if opts[0].respond_to? :intern
hash[opts[0].intern] = opts[1]
else
hash[opts[0]] = opts[1]
end
hash
end
end
end
# $Id$
|