Class: HustleAndFlow::VersionControl
- Inherits:
-
Object
- Object
- HustleAndFlow::VersionControl
- Defined in:
- lib/hustle_and_flow/version_control.rb
Instance Attribute Summary collapse
-
#adapter ⇒ Object
Returns the value of attribute adapter.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(path:) ⇒ VersionControl
constructor
A new instance of VersionControl.
- #method_missing(name, *args) ⇒ Object
Constructor Details
#initialize(path:) ⇒ VersionControl
Returns a new instance of VersionControl.
7 8 9 |
# File 'lib/hustle_and_flow/version_control.rb', line 7 def initialize(path:) self.adapter = self.class.detect.new(path: path) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args) ⇒ Object
15 16 17 |
# File 'lib/hustle_and_flow/version_control.rb', line 15 def method_missing(name, *args) adapter.public_send(name, *args) end |
Instance Attribute Details
#adapter ⇒ Object
Returns the value of attribute adapter.
5 6 7 |
# File 'lib/hustle_and_flow/version_control.rb', line 5 def adapter @adapter end |
Class Method Details
.detect ⇒ Object
11 12 13 |
# File 'lib/hustle_and_flow/version_control.rb', line 11 def self.detect ::HustleAndFlow::VersionControls::Git::Repository end |