Method: Chef::Resource#provider
- Defined in:
- lib/chef/resource.rb
#provider(arg = nil) ⇒ Object
The provider class for this resource.
If ‘action :x do … end` has been declared on this resource or its superclasses, this will return the action_class.
If this is not set, provider_for_action will dynamically determine the provider.
777 778 779 780 781 782 783 784 |
# File 'lib/chef/resource.rb', line 777 def provider(arg = nil) klass = if arg.is_a?(String) || arg.is_a?(Symbol) lookup_provider_constant(arg) else arg end set_or_return(:provider, klass, kind_of: [ Class ]) end |