Skip to content

Commit

Permalink
meta updates
Browse files Browse the repository at this point in the history
  • Loading branch information
janlelis committed Jan 19, 2014
1 parent e080e02 commit fa37e79
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
Empty file removed .gemtest
Empty file.
5 changes: 2 additions & 3 deletions .travis.yml
Expand Up @@ -2,14 +2,13 @@ language: ruby

rvm:
- ruby-head
- 2.1.0
- 2.0.0
- 1.9.3
- 1.9.2
- 1.8.7
- ree
- rbx-19mode
- rbx-18mode
- rbx
- jruby-head
- jruby-19mode
- jruby-18mode

2 changes: 1 addition & 1 deletion LICENSE.txt
@@ -1,6 +1,6 @@
The MIT LICENSE

Copyright (c) 2011-2013 Jan Lelis
Copyright (c) 2011-2014 Jan Lelis

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
6 changes: 3 additions & 3 deletions README.rdoc
Expand Up @@ -29,7 +29,7 @@ In Ruby do:

The only method you need to know to get started is: <tt>Paint.[]</tt>

The first argument given to <tt>Paint.[]</tt> is the string to colorize (if the object is not a string, <tt>to_s</tt> will be called on the object). The other arguments describe how to modify/colorize the string. Let's learn by example:
The first argument given to <tt>Paint.[]</tt> is the string to colorize (if the object is not a string, <tt>to_s</tt> will be called on it). The other arguments describe how to modify/colorize the string. Let's learn by example:

Paint['Ruby', :red] # sets ansi color red
Paint['Ruby', :red, :bright] # also applies bright/bold effect
Expand All @@ -46,7 +46,7 @@ The first argument given to <tt>Paint.[]</tt> is the string to colorize (if the
Paint['Ruby', :italic, :encircle, :rapid_blink, :overline] # probably not supported effects
Paint['Ruby'] # don't pass any argument and the string will not be changed

If you pass multiple colors, the first one is taken as foreground color and the second one defines the background color (all others will be ignored). To only change the background color, you have to pass a <tt>nil</tt> first. Effects can be passed in any order.
When you pass multiple colors, the first one is taken as foreground color and the second one defines the background color, every other will be ignored. To only change the background color, you have to pass a <tt>nil</tt> first. Effects can be passed in any order.

You can find more examples in the specs.

Expand Down Expand Up @@ -161,7 +161,7 @@ There are some supporting methods available. You can get a <tt>p</tt> like alter

Another helper method is <tt>Paint.unpaint</tt>, which removes any ansi colors:

Paint.unpaint( Paint['J-_-L', :red, :bright] ).should == 'J-_-L'
Paint.unpaint( Paint['Ruby', :red, :bright] ).should == 'Ruby'

== J-_-L

Expand Down

0 comments on commit fa37e79

Please sign in to comment.