Class: Spoom::Deadcode::Plugins::Rails

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

Instance Attribute Summary

Attributes inherited from Base

#index

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_constant, #on_define_method, #on_send

Constructor Details

This class inherits a constructor from Spoom::Deadcode::Plugins::Base

Instance Method Details

#on_define_class(definition) ⇒ Object



13
14
15
# File 'lib/spoom/deadcode/plugins/rails.rb', line 13

def on_define_class(definition)
  @index.ignore(definition) if file_is_helper?(definition)
end

#on_define_module(definition) ⇒ Object



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

def on_define_module(definition)
  @index.ignore(definition) if file_is_helper?(definition)
end