Top Level Namespace
Instance Method Summary collapse
Instance Method Details
#capture(name) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'bin/git-audio-commit', line 8 def capture(name) val = nil ARGV.each_with_index do |arg, index| if arg == name val = ARGV[index+1] ARGV.delete_at(index+1) ARGV.delete_at(index) end end val end |
#say_it(audio) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'bin/git-say-log', line 6 def say_it(audio) tempfile = Tempfile.new("git-say-log") tempfile.write Base64.decode64(audio) tempfile.close system("afplay #{tempfile.path}") sleep(0.5) ensure tempfile.unlink end |