Class: Rubycritic::SourceControlSystem
- Inherits:
-
Object
- Object
- Rubycritic::SourceControlSystem
- Defined in:
- lib/rubycritic/source_control_systems/source_control_system.rb
Direct Known Subclasses
Constant Summary collapse
- @@systems =
[]
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.create ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/rubycritic/source_control_systems/source_control_system.rb', line 10 def self.create supported_system = systems.detect(&:supported?) if supported_system supported_system.new else raise "Rubycritic requires a #{system_names} repository." end end |
.register_system ⇒ Object
6 7 8 |
# File 'lib/rubycritic/source_control_systems/source_control_system.rb', line 6 def self.register_system @@systems << self end |
.system_names ⇒ Object
23 24 25 |
# File 'lib/rubycritic/source_control_systems/source_control_system.rb', line 23 def self.system_names systems.join(", ") end |
.systems ⇒ Object
19 20 21 |
# File 'lib/rubycritic/source_control_systems/source_control_system.rb', line 19 def self.systems @@systems end |
Instance Method Details
#has_revision? ⇒ Boolean
27 28 29 |
# File 'lib/rubycritic/source_control_systems/source_control_system.rb', line 27 def has_revision? raise NotImplementedError.new("You must implement the has_revision? method.") end |
#head_reference ⇒ Object
35 36 37 |
# File 'lib/rubycritic/source_control_systems/source_control_system.rb', line 35 def head_reference raise NotImplementedError.new("You must implement the head_reference method.") end |
#travel_to_head ⇒ Object
31 32 33 |
# File 'lib/rubycritic/source_control_systems/source_control_system.rb', line 31 def travel_to_head raise NotImplementedError.new("You must implement the travel_to_head method.") end |