Skip to content

Instantly share code, notes, and snippets.

@davorb
Created June 9, 2012 01:24
Show Gist options
  • Save davorb/2898983 to your computer and use it in GitHub Desktop.
Save davorb/2898983 to your computer and use it in GitHub Desktop.
pry: colors.rb
PS D:\dev\shoes4\lib\shoes> pry
You should: `gem install win32console` for better auto-indent and color support.
[1] pry(main)> require 'color.rb'
=> true
[3] pry(main)> red=Shoes::COLORS[:red]
=> #<Shoes::Color:0x0000000 @alpha=255, @blue=0, @green=0, @red=255>
[4] pry(main)> blue=Shoes::COLORS[:blue]
=> #<Shoes::Color:0x0000000 @alpha=255, @blue=255, @green=0, @red=0>
[5] pry(main)> red==red
=> true
[6] pry(main)> red==blue
=> true
[7] pry(main)> red<=>red
=> 0
[8] pry(main)> red<=>blue
=> 0
[9] pry(main)>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment