Sha256: 44c2627b125a5f5387771727de4c4666a41c15ce26f6b368f5a543d64bf85d3b
Contents?: true
Size: 475 Bytes
Versions: 3
Compression:
Stored size: 475 Bytes
Contents
require 'rainbow' class String [:black, :red, :green, :yellow, :blue, :magenta, :cyan, :white].each do |color| unless instance_methods.include?(color) define_method color do color(color) end define_method "bright_#{color}" do color(color).bright end end end [:gray, :grey].each do |color| unless instance_methods.include?(color) define_method color do color(:black).bright end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
zpng-0.2.4 | lib/zpng/string_ext.rb |
zpng-0.2.3 | lib/zpng/string_ext.rb |
zpng-0.2.2 | lib/zpng/string_ext.rb |