vendor/bundle/ruby/1.8/gems/io-reactor-1.0.4/examples/chatserver.rb
### Process the specified input from the specified user
Process the specified input from the specified user
Process the specified input from the specified user
def processInput( user, *inputStrings )
		inputStrings.each {|str|
			case str
			when %r{^/(\w+)\s*(.*)}
				handleCommand( user, $1, $2 )
			else
				user.addOutput( "You>> #{str}" )
				broadcastMsgFrom( user, str )
			end
		}
		user.prompt if user.connected?
	end
def processInput ( user , * inputStrings ) inputStrings . each { | str | case str when %r{ ^/( \w +) \s *(.*) } handleCommand ( user , $1 , $2 ) else user . addOutput ( "You>> #{str}" ) broadcastMsgFrom ( user , str ) end } user . prompt if user . connected? end
Process the specified input from the specified user
Process the specified input from the specified user
user
inputStrings