diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/chef/mixin/params_validate.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/chef/mixin/params_validate.rb b/lib/chef/mixin/params_validate.rb index ebab964b74..926387b888 100644 --- a/lib/chef/mixin/params_validate.rb +++ b/lib/chef/mixin/params_validate.rb @@ -276,6 +276,14 @@ class Chef false end end + + def _pv_coerce(opts, key, coercer) + if opts.has_key?(key.to_s) + opts[key.to_s] = instance_exec(opts[key], &coercer) + elsif opts.has_key?(key.to_sym) + opts[key.to_sym] = instance_exec(opts[key], &coercer) + end + end end end end |
