Method: RubyGit::CommandLine::Runner#initialize

Defined in:
lib/ruby_git/command_line/runner.rb

#initialize(env, binary_path, global_options, logger) ⇒ Runner

Create a an object to run git commands via the command line

Examples:

env = { 'GIT_DIR' => '/path/to/git/dir' }
binary_path = '/usr/bin/git'
global_options = %w[--git-dir /path/to/git/dir]
logger = Logger.new(STDOUT)
cli = CommandLine.new(env, binary_path, global_options, logger)
cli.run('version') #=> #<RubyGit::CommandLineResult:0x00007f9b0c0b0e00


32
33
34
35
36
37
# File 'lib/ruby_git/command_line/runner.rb', line 32

def initialize(env, binary_path, global_options, logger)
  @env = env
  @binary_path = binary_path
  @global_options = global_options
  @logger = logger
end