Method: Puppet::Parameter::PackageOptions#unsafe_munge
- Defined in:
- lib/puppet/parameter/package_options.rb
#unsafe_munge(values) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/puppet/parameter/package_options.rb', line 8 def unsafe_munge(values) values = [values] unless values.is_a? Array values.collect do |val| case val when Hash safe_hash = {} val.each_pair do |k, v| safe_hash[quote(k)] = quote(v) end safe_hash when String quote(val) else fail("Expected either a string or hash of options") end end end |