class Evm::Git

Public Class Methods

new(path) click to toggle source
# File lib/evm/git.rb, line 3
def initialize(path)
  @path = path
end

Public Instance Methods

clone(url) click to toggle source
# File lib/evm/git.rb, line 11
def clone(url)
  git 'clone', url, @path
end
exist?() click to toggle source
# File lib/evm/git.rb, line 7
def exist?
  File.exist?(@path)
end
pull() click to toggle source
# File lib/evm/git.rb, line 15
def pull
  Dir.chdir(@path) do
    git 'pull'
  end
end

Private Instance Methods

git(*args) click to toggle source
# File lib/evm/git.rb, line 24
def git(*args)
  @git ||= Evm::System.new('git')
  @git.run(*args, '--depth=1')
end