Module: Hookshot
- Defined in:
- lib/hookshot.rb,
lib/hookshot/hook.rb,
lib/hookshot/version.rb,
lib/hookshot/git_hook.rb,
lib/hookshot/hooks_directory.rb,
lib/hookshot/git_hooks_directory.rb
Defined Under Namespace
Modules: GitHooksDirectory, HooksDirectory
Classes: GitHook, Hook
Constant Summary
collapse
- VERSION =
"0.1.0"
Class Method Summary
collapse
Class Method Details
.current_working_directory ⇒ Object
29
30
31
32
|
# File 'lib/hookshot.rb', line 29
def self.current_working_directory
path = @current_working_directory || Dir.pwd
Pathname.new(path)
end
|
.link(current_working_directory: nil) ⇒ Object
.with_captured_stdout ⇒ Object
34
35
36
37
38
39
40
41
|
# File 'lib/hookshot.rb', line 34
def self.with_captured_stdout
old_stdout = $stdout
$stdout = StringIO.new
yield
$stdout.string
ensure
$stdout = old_stdout
end
|