Sha256: 53c12fa82dfcd6d5bb52062213816f3b91ce43d056eb01187f269fd56401ca25

Contents?: true

Size: 455 Bytes

Versions: 5

Compression:

Stored size: 455 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

	# handles user message
	ImsgHandler.ask_for_buddy_with_msg str
end


# Control+C trick in order to get out of exit() signal gracefully
trap("SIGINT") { throw :ctrl_c }
catch :ctrl_c do
	begin
		interactWithUser
	rescue Exception
	end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
imsg-0.0.9 bin/imsg
imsg-0.0.8 bin/imsg
imsg-0.0.7 bin/imsg
imsg-0.0.6 bin/imsg
imsg-0.0.5 bin/imsg