<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -52,6 +52,10 @@ module TermColor
         puts if (index + 1) % 10 == 0
       end
     end
+
+    def colorize(text, color)
+      parse(&quot;&lt;#{color}&gt;#{escape(text)}&lt;/#{color}&gt;&quot;)
+    end
   end
 
   class MyListener </diff>
      <filename>lib/termcolor.rb</filename>
    </modified>
    <modified>
      <diff>@@ -59,5 +59,9 @@ module TermColor
       listener.to_esc_seq('_0').should == &quot;\e[0m&quot;
       listener.to_esc_seq('_31').should == &quot;\e[31m&quot;
     end
+
+    it 'should do colorize' do
+      TermColor.colorize('test', :green).should == &quot;\e[32mtest\e[0m&quot;
+    end
   end
 end</diff>
      <filename>spec/termcolor_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>da5df27ff6f5a55d545ef6e0b4e9ccdce82a7780</id>
    </parent>
  </parents>
  <author>
    <name>jugyo</name>
    <email>jugyo.org@gmail.com</email>
  </author>
  <url>http://github.com/jugyo/termcolor/commit/bd94bad948115ba5c9656c26b7224d773eef04a0</url>
  <id>bd94bad948115ba5c9656c26b7224d773eef04a0</id>
  <committed-date>2009-06-25T07:56:52-07:00</committed-date>
  <authored-date>2009-06-25T07:56:52-07:00</authored-date>
  <message>Added method 'colorize' for colorize easy.</message>
  <tree>26c951b825265ba45a9440a957f9b7000909ac23</tree>
  <committer>
    <name>jugyo</name>
    <email>jugyo.org@gmail.com</email>
  </committer>
</commit>
