Method: Colorize::ClassMethods#color_samples
- Defined in:
- lib/colorize/class_methods.rb
#color_samples ⇒ Object
Display color samples
103 104 105 106 107 108 |
# File 'lib/colorize/class_methods.rb', line 103 def color_samples colors.permutation(2).each do |background, color| sample_text = "#{color.inspect.rjust(15)} on #{background.inspect.ljust(15)}" puts "#{new(sample_text).colorize(:color => color, :background => background)} #{sample_text}" end end |