Module: GitSprint::CaptureOutput
Overview
TODO:
remove the need for something like this.
eww, global vars …
Either:
- use custom help commands so that we can say, color the string
- use something besides thor
All this is needed for now is to capture the output of thor default commands that print to std out, to allow access to the actual help string.
Instance Method Summary collapse
Instance Method Details
#capture_std_out ⇒ Object
28 29 30 31 32 33 34 35 |
# File 'lib/git-sprint.rb', line 28 def capture_std_out dummy = StringIO.new original = $stdout $stdout = dummy yield $stdout = original dummy.string end |