class GitRepo

Attributes

filename[R]
remote[R]

Public Class Methods

new(filename) click to toggle source
# File lib/gitrepo.rb, line 3
def initialize(filename)
  @filename = filename
  @remote = ""
end

Public Instance Methods

find_remote() click to toggle source
# File lib/gitrepo.rb, line 8
def find_remote()
  file = File.new(filename, "r")
  while (line = file.gets)
    if line.start_with?("[remote")
      @remote = file.gets.gsub("url = git@github.com:", "https://github.com/")
      break
    end
  end
  file.close
  @remote
end