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
56 57 58 59 60 61 |
# File 'lib/gitcopy.rb', line 56 def self.repoDirName(repoPath) repoName = repoName(repoPath) repoExtension = repoExtension(repoPath) repoDirName = repoName[0...-repoExtension.length] return repoDirName end |
.repoExtension(repoPath) ⇒ Object
50 51 52 53 54 |
# File 'lib/gitcopy.rb', line 50 def self.repoExtension(repoPath) repoName = repoName(repoPath) repoExtension = repoName.split(//).last(4).join return repoExtension end |
.repoName(repoPath) ⇒ Object
45 46 47 48 |
# File 'lib/gitcopy.rb', line 45 def self.repoName(repoPath) repoName = repoPath.split("/").last return repoName end |
.repoProtocol(repoPath) ⇒ Object
40 41 42 43 |
# File 'lib/gitcopy.rb', line 40 def self.repoProtocol(repoPath) repoProtocol = repoPath[0...4] return repoProtocol end |