Class: RailsLens::Providers::SectionProviderBase
- Inherits:
-
Base
- Object
- Base
- RailsLens::Providers::SectionProviderBase
show all
- Defined in:
- lib/rails_lens/providers/section_provider_base.rb
Overview
Base class for section providers that wrap analyzers
Instance Method Summary
collapse
Methods inherited from Base
#applicable?
Instance Method Details
#analyzer_class ⇒ Object
11
12
13
|
# File 'lib/rails_lens/providers/section_provider_base.rb', line 11
def analyzer_class
raise NotImplementedError, "#{self.class} must implement #analyzer_class"
end
|
#process(model_class, connection = nil) ⇒ Object
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/rails_lens/providers/section_provider_base.rb', line 15
def process(model_class, connection = nil)
analyzer = analyzer_class.new(model_class)
content = analyzer.analyze
return nil unless content
{
title: nil, content: content
}
end
|
#type ⇒ Object
7
8
9
|
# File 'lib/rails_lens/providers/section_provider_base.rb', line 7
def type
:section
end
|