module CodeCache
Public Class Methods
identify(url)
click to toggle source
# File lib/code_cache.rb, line 6 def self.identify(url) if (url =~ /.*\.git\s*$/) :git else :svn end end
repo(url, options = {})
click to toggle source
# File lib/code_cache.rb, line 14 def self.repo(url, options = {}) if self.identify(url) == :git Repo::Git.new(url, options) else Repo::SVN.new(url, options) end end