Module: Jets::Util::Git

Included in:
Code::Copy::Base, Code::Stager
Defined in:
lib/jets/util/git.rb

Instance Method Summary collapse

Instance Method Details

#git?Boolean

Returns:

  • (Boolean)


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

def git?
  File.exist?("#{Jets.root}/.git") && git_installed?
end

#git_installed?Boolean

Returns:

  • (Boolean)


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

def git_installed?
  system("type git > /dev/null 2>&1")
end