Class: Spoom::Deadcode::Plugins::ActionMailer

Inherits:
Base
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/spoom/deadcode/plugins/action_mailer.rb

Instance Method Summary collapse

Methods inherited from Base

ignore_classes_inheriting_from, ignore_classes_named, ignore_constants_named, ignore_methods_named, ignore_modules_named, #internal_on_define_accessor, #internal_on_define_class, #internal_on_define_constant, #internal_on_define_method, #internal_on_define_module, #internal_on_send, #on_define_accessor, #on_define_class, #on_define_constant, #on_define_method, #on_define_module

Instance Method Details

#on_send(indexer, send) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/spoom/deadcode/plugins/action_mailer.rb', line 11

def on_send(indexer, send)
  return unless send.recv.nil? && ActionPack::CALLBACKS.include?(send.name)

  send.each_arg(SyntaxTree::SymbolLiteral) do |arg|
    indexer.reference_method(indexer.node_string(arg.value), send.node)
  end
end