def find_resources(type)
      resource_collection.all_resources.select do |resource|
        resource_name(resource) == type.to_sym
      end
    end
def find_resources(type)
      resource_collection.all_resources.select do |resource|
        resource_name(resource) == type.to_sym
      end
    end
Find the resource with the declared type.

 @example Find all template resources
   chef_run.find_resources(:template) #=> [#<Chef::Resource::Template>, #...]


 @param [Symbol] type
   The type of resource such as `:file` or `:directory`.

 @return [Array<Chef::Resource>]
   The matching resources