Class: Hyrax::SearchService

Inherits:
Blacklight::SearchService
  • Object
show all
Defined in:
app/services/hyrax/search_service.rb

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name, *arguments, &block) ⇒ Object (private)



11
12
13
14
15
16
17
18
19
20
# File 'app/services/hyrax/search_service.rb', line 11

def method_missing(method_name, *arguments, &block)
  if scope&.respond_to?(method_name)
    Deprecation.warn(self.class, "Calling `#{method_name}` on scope " \
      'is deprecated and will be removed in Blacklight 8. Call #to_h first if you ' \
      ' need to use hash methods (or, preferably, use your own SearchState implementation)')
    scope&.public_send(method_name, *arguments, &block)
  else
    super
  end
end