module Jekyll::Algolia::Hooks
def self.apply_each(record, node, context)
record - The hash of the record to be pushed
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_each hook to the record.
def self.apply_each(record, node, context) case method(:before_indexing_each).arity when 1 before_indexing_each(record) when 2 before_indexing_each(record, node) else before_indexing_each(record, node, context) end end