Sha256: 6c3c457533680ec19e560c90bd654327d86516fc373fc0691f2b41381df2b12b

Contents?: true

Size: 248 Bytes

Versions: 3

Compression:

Stored size: 248 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
        self.send(:color, color)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
zpng-0.2.0 lib/zpng/string_ext.rb
zpng-0.1.2 lib/zpng/string_ext.rb
zpng-0.1.1 lib/zpng/string_ext.rb