Class: GitProperties
- Inherits:
-
Object
- Object
- GitProperties
- Defined in:
- lib/gitcopy.rb
Class Method Summary collapse
- .repoDirName(repoPath) ⇒ Object
- .repoExtension(repoPath) ⇒ Object
- .repoName(repoPath) ⇒ Object
- .repoProtocol(repoPath) ⇒ Object
Class Method Details
.repoDirName(repoPath) ⇒ Object
52 53 54 55 56 57 |
# File 'lib/gitcopy.rb', line 52 def self.repoDirName(repoPath) repoName = repoName(repoPath) repoExtension = repoExtension(repoPath) repoDirName = repoName[0...-repoExtension.length] return repoDirName end |
.repoExtension(repoPath) ⇒ Object
46 47 48 49 50 |
# File 'lib/gitcopy.rb', line 46 def self.repoExtension(repoPath) repoName = repoName(repoPath) repoExtension = repoName.split(//).last(4).join return repoExtension end |
.repoName(repoPath) ⇒ Object
41 42 43 44 |
# File 'lib/gitcopy.rb', line 41 def self.repoName(repoPath) repoName = repoPath.split("/").last return repoName end |
.repoProtocol(repoPath) ⇒ Object
36 37 38 39 |
# File 'lib/gitcopy.rb', line 36 def self.repoProtocol(repoPath) repoProtocol = repoPath[0...4] return repoProtocol end |