Module: Gitit::GitExecutor

Included in:
GitBranch, GitBranches, GitConfig, GitStatus
Defined in:
lib/gitit/git_executor.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#repoObject (readonly)

Returns the value of attribute repo.



6
7
8
# File 'lib/gitit/git_executor.rb', line 6

def repo
  @repo
end

Class Method Details

.repoObject



8
9
10
# File 'lib/gitit/git_executor.rb', line 8

def self.repo
  @repo
end

Instance Method Details

#execute_command(command) ⇒ Object



12
13
14
15
# File 'lib/gitit/git_executor.rb', line 12

def execute_command(command)
  git_command = ['git', command].join(' ')
  `(cd #{@repo.location} && #{git_command} 2>&1)`
end