Class: Evm::Git

Inherits:
Object
  • Object
show all
Defined in:
lib/evm/git.rb

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ Git

Returns a new instance of Git.



3
4
5
# File 'lib/evm/git.rb', line 3

def initialize(path)
  @path = path
end

Instance Method Details

#clone(url) ⇒ Object



11
12
13
# File 'lib/evm/git.rb', line 11

def clone(url)
  git 'clone', url, @path
end

#exist?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/evm/git.rb', line 7

def exist?
  File.exist?(@path)
end

#pullObject



15
16
17
18
19
# File 'lib/evm/git.rb', line 15

def pull
  Dir.chdir(@path) do
    git 'pull'
  end
end