Class: RailsLens::Providers::NotesProviderBase
- Inherits:
-
Base
- Object
- Base
- RailsLens::Providers::NotesProviderBase
show all
- Defined in:
- lib/rails_lens/providers/notes_provider_base.rb
Overview
Base class for notes providers that wrap analyzers
Instance Method Summary
collapse
Instance Method Details
#analyzer_class ⇒ Object
16
17
18
|
# File 'lib/rails_lens/providers/notes_provider_base.rb', line 16
def analyzer_class
raise NotImplementedError, "#{self.class} must implement #analyzer_class"
end
|
#applicable?(model_class) ⇒ Boolean
11
12
13
14
|
# File 'lib/rails_lens/providers/notes_provider_base.rb', line 11
def applicable?(model_class)
model_has_table?(model_class) && !ModelDetector.view_exists?(model_class)
end
|
#process(model_class, connection = nil) ⇒ Object
20
21
22
23
|
# File 'lib/rails_lens/providers/notes_provider_base.rb', line 20
def process(model_class, connection = nil)
analyzer = analyzer_class.new(model_class)
analyzer.analyze
end
|
#type ⇒ Object
7
8
9
|
# File 'lib/rails_lens/providers/notes_provider_base.rb', line 7
def type
:notes
end
|