Class: MiniGit::Capturing
Constant Summary
Constants inherited from MiniGit
Instance Attribute Summary collapse
-
#shellout ⇒ Object
readonly
Returns the value of attribute shellout.
Attributes inherited from MiniGit
#git_command, #git_dir, #git_work_tree
Instance Method Summary collapse
Methods inherited from MiniGit
#find_git_dir, git, #initialize, method_missing, #method_missing, #switches_for, #system
Constructor Details
This class inherits a constructor from MiniGit
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class MiniGit
Instance Attribute Details
#shellout ⇒ Object (readonly)
Returns the value of attribute shellout.
139 140 141 |
# File 'lib/minigit.rb', line 139 def shellout @shellout end |
Instance Method Details
#capturing ⇒ Object
151 152 153 |
# File 'lib/minigit.rb', line 151 def capturing self end |
#git(*args) ⇒ Object
141 142 143 144 145 146 147 148 149 |
# File 'lib/minigit.rb', line 141 def git(*args) argv = switches_for(*args) argv << { :environment => { 'GIT_DIR' => git_dir, 'GIT_WORK_TREE' => git_work_tree } } @shellout = Mixlib::ShellOut.new(git_command, *argv) @shellout.run_command.error! @shellout.stdout rescue Mixlib::ShellOut::ShellCommandFailed raise GitError.new(argv, @shellout.status, :shellout => @shellout) end |