Method: RR::MethodDispatches::MethodDispatch#call_original_method

Defined in:
lib/rr/method_dispatches/method_dispatch.rb

#call_original_methodObject



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/rr/method_dispatches/method_dispatch.rb', line 32

def call_original_method
  if subject_has_original_method?
    if KeywordArguments.fully_supported?
      subject.__send__(original_method_alias_name, *args, **kwargs, &block)
    else
      subject.__send__(original_method_alias_name, *args, &block)
    end
  elsif subject_has_original_method_missing?
    call_original_method_missing
  else
    if KeywordArguments.fully_supported?
      subject.__send__(:method_missing, method_name, *args, **kwargs, &block)
    else
      subject.__send__(:method_missing, method_name, *args, &block)
    end
  end
end