Commits

Richo Healey committed 7a38954

Highlight tweets at you in red

Comments (0)

Files changed (3)

 
 On the upside, it'll make unit testing similar.  
 (Add unit tests)
+
+Add an option to beep when you're mentioned.
 end
 
 class String
+  # TODO - It'd be nice to implement the colors support here, maybe even only
+  # mix this in if it's enabled?
   def red
     "#{self}"
   end
   def bold
     "#{self}"
   end
+
+  def mentions?(name)
+    return self.downcase.include?(name.to_s.downcase)
+  end
 end
 
 module Twat
       if config.colors?
         if twt.user.screen_name == account_name.to_s
           puts "#{twt.user.screen_name.bold.blue}: #{twt.text}"
+        elsif twt.text.mentions?(account_name)
+          puts "#{twt.user.screen_name.bold.red}: #{twt.text}"
         else
           puts "#{twt.user.screen_name.bold.cyan}: #{twt.text}"
         end