Class: RailsLens::Analyzers::Inheritance

Inherits:
Base
  • Object
show all
Defined in:
lib/rails_lens/analyzers/inheritance.rb

Instance Attribute Summary

Attributes inherited from Base

#model_class

Instance Method Summary collapse

Methods inherited from Base

#initialize

Methods included from ErrorHandling

#safe_analyze

Constructor Details

This class inherits a constructor from RailsLens::Analyzers::Base

Instance Method Details

#analyzeObject



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/rails_lens/analyzers/inheritance.rb', line 6

def analyze
  results = []

  results << analyze_sti if sti_model?
  results << analyze_delegated_type if delegated_type_model?
  results << analyze_polymorphic if polymorphic_associations?

  return nil if results.empty?

  results.compact.join("\n\n")
end