Colored strings with ruby

  • …much more funny with awesome print gem:

    alt

         $ gem install awesome_print
         ruby-1.9.2-p0 > require 'ap'
         ruby-1.9.2-p0 > "my string".method(:green)
          => #<Method: String#green>
         ruby-1.9.2-p0 > "my string".green
          => "\e[1;32mmy string\e[0m" 

    String Extension

    UPD: Colored