Class: RubyCritic::SourceControlSystem::Base
- Inherits:
-
Object
- Object
- RubyCritic::SourceControlSystem::Base
show all
- Defined in:
- lib/rubycritic/source_control_systems/base.rb
Constant Summary
collapse
- @@systems =
[]
Class Method Summary
collapse
Class Method Details
.connected_system_names ⇒ Object
30
31
32
|
# File 'lib/rubycritic/source_control_systems/base.rb', line 30
def self.connected_system_names
"#{systems[0...-1].join(', ')} or #{systems[-1]}"
end
|
.create ⇒ Object
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/rubycritic/source_control_systems/base.rb', line 18
def self.create
supported_system = systems.find(&:supported?)
if supported_system
supported_system.new
else
puts 'RubyCritic can provide more feedback if you use '\
"a #{connected_system_names} repository. "\
'Churn will not be calculated.'
Double.new
end
end
|
.register_system ⇒ Object
10
11
12
|
# File 'lib/rubycritic/source_control_systems/base.rb', line 10
def self.register_system
@@systems << self
end
|
.systems ⇒ Object
14
15
16
|
# File 'lib/rubycritic/source_control_systems/base.rb', line 14
def self.systems
@@systems
end
|