Module: T::CompatibilityPatches::MethodExtensions

Defined in:
lib/types/compatibility_patches.rb

Instance Method Summary collapse

Instance Method Details

#arityObject



77
78
79
80
81
82
# File 'lib/types/compatibility_patches.rb', line 77

def arity
  arity = super
  return arity if arity != -1 || self.is_a?(Proc)
  sig = T::Private::Methods.signature_for_method(self)
  sig ? sig.method.arity : arity
end

#parametersObject



89
90
91
92
# File 'lib/types/compatibility_patches.rb', line 89

def parameters
  sig = T::Private::Methods.signature_for_method(self)
  sig ? sig.method.parameters : super
end

#source_locationObject



84
85
86
87
# File 'lib/types/compatibility_patches.rb', line 84

def source_location
  sig = T::Private::Methods.signature_for_method(self)
  sig ? sig.method.source_location : super
end