Class: RailsPulse::Analysis::BaseAnalyzer

Inherits:
Object
  • Object
show all
Defined in:
app/services/rails_pulse/analysis/base_analyzer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#operationsObject (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

#queryObject (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

#analyzeObject

Each analyzer must implement this method

Raises:

  • (NotImplementedError)


14
15
16
# File 'app/services/rails_pulse/analysis/base_analyzer.rb', line 14

def analyze
  raise NotImplementedError, "#{self.class} must implement #analyze"
end