examples/chatserver.rb
def process_input( user, *input_strings )
		input_strings.each do |str|
			case str

			when %r{^/(\w+)\s*(.*)}
				self.handle_command( user, $1, $2 )

			else
				user.add_output( "You>> #{str}" )
				self.broadcast_msg_from( user, str )
			end
		end

		user.prompt if user.connected?
	end
### 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 process_input( user, *input_strings )
		input_strings.each do |str|
			case str
			when %r{^/(\w+)\s*(.*)}
				self.handle_command( user, $1, $2 )
			else
				user.add_output( "You>> #{str}" )
				self.broadcast_msg_from( user, str )
			end
		end
		user.prompt if user.connected?
	end
def process_input ( user , * input_strings ) input_strings . each do | str | case str when %r{ ^/( \w +) \s *(.*) } self . handle_command ( user , $1 , $2 ) else user . add_output ( "You>> #{str}" ) self . broadcast_msg_from ( user , str ) end end user . prompt if user . connected? end
Process the specified input from the specified user
Process the specified input from the specified user
user
input_strings