Replace guard statements with cases
Repository.new(repo).path -> Repository.path repo