motion-colorize for RubyMotion

motion-colorize lets you add a little color to your RubyMotion output:

Default colorize

Pretty cool, right?

Installation

  • gem install motion-colorize
  • require 'motion-colorize'

or add it to your Gemfile:

  • gem 'motion-colorize'

Usage

motion-colorize really does nothing except add the colorize gem to your project. Yes, really, that's it.

class AppDelegate
  def application(application, didFinishLaunchingWithOptions:launchOptions)
    puts "This is blue".colorize(:blue)
    puts "This is light blue".colorize(:light_blue)
    puts "This is light blue with white background".colorize( :color => :light_blue, :background => :white )
    puts "This is blue on white and underline".colorize( :blue ).on_white.underline
    puts "This is black and yellow black and yellow".yellow
    puts "This is red".red.on_yellow

    true
  end
end

For a more complete reference, refer to colorize's documentation.

Contact

Clay Allsopp (http://clayallsopp.com) (really though, this hardly counts as a/my gem, I'm just happy to be here.)

License

motion-colorize is available under the MIT license. See the LICENSE file for more info.