Class: GitProperties

Inherits:
Object
  • Object
show all
Defined in:
lib/gitcopy.rb

Class Method Summary collapse

Class Method Details

.repoDirName(repoPath) ⇒ Object



55
56
57
58
59
60
# File 'lib/gitcopy.rb', line 55

def self.repoDirName(repoPath)
	repoName = repoName(repoPath)
	repoExtension = repoExtension(repoPath)
	repoDirName = repoName[0...-repoExtension.length]
	return repoDirName
end

.repoExtension(repoPath) ⇒ Object



49
50
51
52
53
# File 'lib/gitcopy.rb', line 49

def self.repoExtension(repoPath)
	repoName = repoName(repoPath)
	repoExtension = repoName.split(//).last(4).join
	return repoExtension
end

.repoName(repoPath) ⇒ Object



44
45
46
47
# File 'lib/gitcopy.rb', line 44

def self.repoName(repoPath)
	repoName = repoPath.split("/").last
	return repoName
end

.repoProtocol(repoPath) ⇒ Object



39
40
41
42
# File 'lib/gitcopy.rb', line 39

def self.repoProtocol(repoPath)
	repoProtocol = repoPath[0...4]
	return repoProtocol
end