Sha256: d2fb6e1cdf4c02e85e7787413f808e22a0a0bb26e3beac509a3ee3ff4628320d
Contents?: true
Size: 625 Bytes
Versions: 2
Compression:
Stored size: 625 Bytes
Contents
#!/usr/bin/env ruby require 'imsg' def interactWithUser # Gets the message and concatenate it into a string str = "" ARGV.each do |value| str +=value+" " end str = str.chomp(' '); ARGV.clear STDOUT.flush # Show the chat list with the buddies names ImsgHandler.showChatList # Gets the buddy name or number response = gets.chomp # Send the message captured on the beggining to the selected buddy ImsgHandler.sendMessage str, response end # Control+C trick in order to get out of command gracefully trap("SIGINT") { throw :ctrl_c } catch :ctrl_c do begin interactWithUser rescue Exception end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
imsg-0.0.4 | bin/imsg |
imsg-0.0.3 | bin/imsg |