Class: Hardhat::Repository::Git

Inherits:
Object
  • Object
show all
Includes:
Hardhat::Repository
Defined in:
lib/hardhat/repository/git.rb

Instance Attribute Summary

Attributes included from Hardhat::Repository

#path, #url

Instance Method Summary collapse

Methods included from Hardhat::Repository

#initialize

Instance Method Details

#getObject



4
5
6
7
8
9
10
# File 'lib/hardhat/repository/git.rb', line 4

def get
  if Dir.exists? path
    system("cd #{path} && git pull --quiet")
  else
    system("git clone --quiet #{url} #{path}")
  end
end