lib/tw/app/render.rb in tw-0.1.1 vs lib/tw/app/render.rb in tw-0.2.0

- old
+ new

@@ -6,9 +6,10 @@ n = str.each_byte.map{|c| c.to_i}.inject{|a,b|a+b} return colors[n%colors.size] end def self.display(arr) + arr = [arr] unless arr.kind_of? Array arr.flatten.sort{|a,b| a[:id] <=> b[:id] }.uniq.each{|m| user = m[:user].kind_of?(Hash) ? "@#{m[:user][:from]} > @#{m[:user][:to]}" : "@#{m[:user]}" line = "#{m[:time].strftime '[%m/%d %a] (%H:%M:%S)'} #{user} : #{m[:text]}"