Class: Repokeeper::Analyzers::Analyzer
- Inherits:
-
Object
- Object
- Repokeeper::Analyzers::Analyzer
show all
- Defined in:
- lib/repokeeper/analyzers/analyzer.rb
Overview
Base class for sequential commits analyzers
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(config) ⇒ Analyzer
Returns a new instance of Analyzer.
14
15
16
|
# File 'lib/repokeeper/analyzers/analyzer.rb', line 14
def initialize(config)
@config = config || {}
end
|
Class Method Details
.all ⇒ Object
6
7
8
|
# File 'lib/repokeeper/analyzers/analyzer.rb', line 6
def self.all
@all.clone
end
|
.inherited(subclass) ⇒ Object
10
11
12
|
# File 'lib/repokeeper/analyzers/analyzer.rb', line 10
def self.inherited(subclass)
@all << subclass
end
|
Instance Method Details
#enabled? ⇒ Boolean
22
23
24
|
# File 'lib/repokeeper/analyzers/analyzer.rb', line 22
def enabled?
@config.fetch('enabled') { true }
end
|
#name ⇒ Object
18
19
20
|
# File 'lib/repokeeper/analyzers/analyzer.rb', line 18
def name
self.class.name.split('::').last
end
|