Class: TypeTracer::ArgSendTypeCheck::MethodChecker

Inherits:
Object
  • Object
show all
Defined in:
lib/type_tracer/arg_send_type_check/method_checker.rb

Instance Method Summary collapse

Constructor Details

#initialize(method_def:, method_sym:, class_sym:, arg_types:) ⇒ MethodChecker

Returns a new instance of MethodChecker.



5
6
7
8
9
10
# File 'lib/type_tracer/arg_send_type_check/method_checker.rb', line 5

def initialize(method_def:, method_sym:, class_sym:, arg_types:)
  @method_def = method_def
  @method_sym = method_sym
  @class_sym = class_sym
  @arg_types = arg_types
end

Instance Method Details

#bad_arg_send_messagesObject



12
13
14
15
# File 'lib/type_tracer/arg_send_type_check/method_checker.rb', line 12

def bad_arg_send_messages
  # For each argument to the method
  analyzer.arg_names.flat_map(&method(:bad_arg_sends)).compact
end