diff options
Diffstat (limited to 'lib/puppet/parameter.rb')
-rw-r--r-- | lib/puppet/parameter.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/puppet/parameter.rb b/lib/puppet/parameter.rb index d34bc7a9e..91949e5e3 100644 --- a/lib/puppet/parameter.rb +++ b/lib/puppet/parameter.rb @@ -445,6 +445,12 @@ class Puppet::Parameter < Puppet::Element end end + # Retrieve the parent's provider. Some types don't have providers, in which + # case we return the parent object itself. + def provider + @parent.provider || @parent + end + # If there's a shadowing metaparam, instantiate it now. # This allows us to create a property or parameter with the # same name as a metaparameter, and the metaparam will only be |