Method: Chef.set_provider_priority_array

Defined in:
lib/chef/chef_class.rb

.set_provider_priority_array(resource_name, priority_array, **filter, &block) ⇒ Array<Class>

Set the array of providers associated with a resource_name for the current node

Parameters:

  • resource_name (Symbol)

    name of the resource as a symbol

  • priority_array (Class, Array<Class>)

    Class or Array of Classes to set as the priority for resource_name on the node

  • filter (Hash)

    Chef::Nodearray-style filter

Returns:

  • (Array<Class>)

    Modified Priority Array of Provider Classes to use for the resource_name on the node



99
100
101
102
103
# File 'lib/chef/chef_class.rb', line 99

def set_provider_priority_array(resource_name, priority_array, **filter, &block)
  result = provider_priority_map.set_priority_array(resource_name.to_sym, priority_array, **filter, &block)
  result = result.dup if result
  result
end