module Jekyll::Algolia::Hooks

def self.apply_all(records, context)

records - The list of all records to be indexed

as they can be mocked in tests.
by users. Using a wrapper around it makes testing their behavior easier
This method is a simple wrapper around methods that can be overwritten
Public: Apply the before_indexing_all hook to all records.
def self.apply_all(records, context)
  case method(:before_indexing_all).arity
  when 1
    before_indexing_all(records)
  else
    before_indexing_all(records, context)
  end
end