Class: Spotlight::ResourceProvider

Inherits:
Object
  • Object
show all
Defined in:
app/models/spotlight/resource_provider.rb

Overview

Detect which Spotlight::Resource subclasses can provide indexing routines for a given resource

Class Method Summary collapse

Class Method Details

.for_resource(resource) ⇒ Class

Returns the class that can best provide indexing for the resource.

Returns:

  • (Class)

    the class that can best provide indexing for the resource



9
10
11
# File 'app/models/spotlight/resource_provider.rb', line 9

def for_resource(resource)
  providers_for_resource(resource).first
end