Methods
C
Instance Public methods
call_method(target, method)
# File activerecord/test/cases/relation/delegation_test.rb, line 9
def call_method(target, method)
  method_arity = target.to_a.method(method).arity

  if method_arity.zero?
    target.public_send(method)
  elsif method_arity < 0
    if method == :shuffle!
      target.public_send(method)
    else
      target.public_send(method, 1)
    end
   elsif method_arity == 1
    target.public_send(method, 1)
  else
    raise NotImplementedError
  end
end