Class: Spoom::Deadcode::Plugins::ActiveSupport
- Defined in:
- lib/spoom/deadcode/plugins/active_support.rb
Constant Summary collapse
- SETUP_AND_TEARDOWN_METHODS =
T.let(["setup", "teardown"], T::Array[String])
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
ignore_classes_inheriting_from, ignore_classes_named, ignore_constants_named, ignore_methods_named, ignore_modules_named, #initialize, #internal_on_define_accessor, #internal_on_define_class, #internal_on_define_constant, #internal_on_define_method, #internal_on_define_module, #on_define_accessor, #on_define_class, #on_define_constant, #on_define_method, #on_define_module
Constructor Details
This class inherits a constructor from Spoom::Deadcode::Plugins::Base
Instance Method Details
#on_send(send) ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/spoom/deadcode/plugins/active_support.rb', line 22 def on_send(send) return unless send.recv.nil? && SETUP_AND_TEARDOWN_METHODS.include?(send.name) send.each_arg(Prism::SymbolNode) do |arg| @index.reference_method(T.must(arg.value), send.location) end end |