Module: Inch::Utils::ShellHelper

Included in:
API::Diff, CLI::Command::Diff, CLI::Command::Options::Diff
Defined in:
lib/inch/utils/shell_helper.rb

Instance Method Summary collapse

Instance Method Details

#git(dir, command) ⇒ Object



4
5
6
7
8
# File 'lib/inch/utils/shell_helper.rb', line 4

def git(dir, command)
  Dir.chdir(dir) do
    sh("git #{command}")
  end
end

#sh(command) ⇒ Object



10
11
12
# File 'lib/inch/utils/shell_helper.rb', line 10

def sh(command)
  `#{command}`
end