Marry Jane Marry Jane - 6 months ago 3x
Ruby Question

Spits out 1 message instead of more than 1 message

I want to make a command that shows the people in a chatroom. I did...

m.roster.keys.each do |v|
. When I say that command, it gives out •user1
•user2 •user 3 •user4... (more than 4 messages). How can I make it by sending 1 message that contains all of the users in the chatroom instead of more than 1?


I believe this is what you are looking for :

m.say( { |v| "•#{v}" }.join(' '), nick)