Class: RailsPulse::Analysis::BaseAnalyzer
- Inherits:
-
Object
- Object
- RailsPulse::Analysis::BaseAnalyzer
- Defined in:
- app/services/rails_pulse/analysis/base_analyzer.rb
Direct Known Subclasses
BacktraceAnalyzer, ExplainPlanAnalyzer, IndexRecommendationEngine, NPlusOneDetector, QueryCharacteristicsAnalyzer
Instance Attribute Summary collapse
-
#operations ⇒ Object
readonly
Returns the value of attribute operations.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
Instance Method Summary collapse
-
#analyze ⇒ Object
Each analyzer must implement this method.
-
#initialize(query, operations = []) ⇒ BaseAnalyzer
constructor
A new instance of BaseAnalyzer.
Constructor Details
#initialize(query, operations = []) ⇒ BaseAnalyzer
Returns a new instance of BaseAnalyzer.
8 9 10 11 |
# File 'app/services/rails_pulse/analysis/base_analyzer.rb', line 8 def initialize(query, operations = []) @query = query @operations = Array(operations) end |
Instance Attribute Details
#operations ⇒ Object (readonly)
Returns the value of attribute operations.
6 7 8 |
# File 'app/services/rails_pulse/analysis/base_analyzer.rb', line 6 def operations @operations end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
6 7 8 |
# File 'app/services/rails_pulse/analysis/base_analyzer.rb', line 6 def query @query end |
Instance Method Details
#analyze ⇒ Object
Each analyzer must implement this method
14 15 16 |
# File 'app/services/rails_pulse/analysis/base_analyzer.rb', line 14 def analyze raise NotImplementedError, "#{self.class} must implement #analyze" end |