Class: Spoom::Deadcode::Plugins::Base

Inherits:
Object
  • Object
show all
Extended by:
T::Helpers, T::Sig
Defined in:
lib/spoom/deadcode/plugins/base.rb

Direct Known Subclasses

Ruby

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.ignore_method_names(*names) ⇒ Object



34
35
36
# File 'lib/spoom/deadcode/plugins/base.rb', line 34

def ignore_method_names(*names)
  save_names_and_patterns(names, :@ignored_method_names, :@ignored_method_patterns)
end

Instance Method Details

#on_define_accessor(indexer, definition) ⇒ Object



72
73
74
# File 'lib/spoom/deadcode/plugins/base.rb', line 72

def on_define_accessor(indexer, definition)
  # no-op
end

#on_define_class(indexer, definition) ⇒ Object



90
91
92
# File 'lib/spoom/deadcode/plugins/base.rb', line 90

def on_define_class(indexer, definition)
  # no-op
end

#on_define_constant(indexer, definition) ⇒ Object



108
109
110
# File 'lib/spoom/deadcode/plugins/base.rb', line 108

def on_define_constant(indexer, definition)
  # no-op
end

#on_define_method(indexer, definition) ⇒ Object



128
129
130
# File 'lib/spoom/deadcode/plugins/base.rb', line 128

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

#on_define_module(indexer, definition) ⇒ Object



146
147
148
# File 'lib/spoom/deadcode/plugins/base.rb', line 146

def on_define_module(indexer, definition)
  # no-op
end

#on_send(indexer, send) ⇒ Object



164
165
166
# File 'lib/spoom/deadcode/plugins/base.rb', line 164

def on_send(indexer, send)
  # no-op
end