Class: Evm::Git
- Inherits:
-
Object
- Object
- Evm::Git
- Defined in:
- lib/evm/git.rb
Instance Method Summary collapse
- #clone(url) ⇒ Object
- #exist? ⇒ Boolean
-
#initialize(path) ⇒ Git
constructor
A new instance of Git.
- #pull ⇒ Object
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
7 8 9 |
# File 'lib/evm/git.rb', line 7 def exist? File.exist?(@path) end |
#pull ⇒ Object
15 16 17 18 19 |
# File 'lib/evm/git.rb', line 15 def pull Dir.chdir(@path) do git 'pull' end end |