Class: Spoom::Deadcode::Plugins::Rubocop

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

Constant Summary collapse

RUBOCOP_CONSTANTS =
T.let(["MSG", "RESTRICT_ON_SEND"].to_set.freeze, T::Set[String])

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_module, #on_send

Instance Method Details

#on_define_constant(indexer, definition) ⇒ Object



18
19
20
# File 'lib/spoom/deadcode/plugins/rubocop.rb', line 18

def on_define_constant(indexer, definition)
  definition.ignored! if rubocop_constant?(indexer, definition)
end

#on_define_method(indexer, definition) ⇒ Object



23
24
25
# File 'lib/spoom/deadcode/plugins/rubocop.rb', line 23

def on_define_method(indexer, definition)
  definition.ignored! if rubocop_method?(indexer, definition)
end