Class: EagerEye::Analyzer
- Inherits:
-
Object
- Object
- EagerEye::Analyzer
- Defined in:
- lib/eager_eye/analyzer.rb
Constant Summary collapse
- DETECTOR_CLASSES =
{ loop_association: Detectors::LoopAssociation, serializer_nesting: Detectors::SerializerNesting, missing_counter_cache: Detectors::MissingCounterCache, custom_method_query: Detectors::CustomMethodQuery }.freeze
Instance Attribute Summary collapse
-
#issues ⇒ Object
readonly
Returns the value of attribute issues.
-
#paths ⇒ Object
readonly
Returns the value of attribute paths.
Instance Method Summary collapse
-
#initialize(paths: nil) ⇒ Analyzer
constructor
A new instance of Analyzer.
- #run ⇒ Object
Constructor Details
#initialize(paths: nil) ⇒ Analyzer
Returns a new instance of Analyzer.
16 17 18 19 |
# File 'lib/eager_eye/analyzer.rb', line 16 def initialize(paths: nil) @paths = Array(paths || EagerEye.configuration.app_path) @issues = [] end |
Instance Attribute Details
#issues ⇒ Object (readonly)
Returns the value of attribute issues.
14 15 16 |
# File 'lib/eager_eye/analyzer.rb', line 14 def issues @issues end |
#paths ⇒ Object (readonly)
Returns the value of attribute paths.
14 15 16 |
# File 'lib/eager_eye/analyzer.rb', line 14 def paths @paths end |
Instance Method Details
#run ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/eager_eye/analyzer.rb', line 21 def run @issues = [] ruby_files.each do |file_path| analyze_file(file_path) end @issues end |