module Pagy::Search

def pagy_search(arg, options={}, &block)

it also pushes to the same array an eventually called method and arguments
after the pagination variables are merged to the options
returns an array used to delay the call of #search
def pagy_search(arg, options={}, &block)
  [self, arg, options, block].tap do |args|
    args.define_singleton_method(:method_missing){|*a| args += a}
  end
end