Sha256: b152e905d66a82cf11930865a685e407136ad3b91416163715e280a49c26593d

Contents?: true

Size: 194 Bytes

Versions: 8

Compression:

Stored size: 194 Bytes

Contents

class String
  def colorize(color_code)
    "\e[#{color_code}m#{self}\e[0m"
  end

  def green
    colorize(42)
  end

  def yellow
    colorize(43)
  end

  def gray
    colorize(47)
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
wordle-0.6.0 lib/string.rb
wordle-0.5.0 lib/string.rb
wordle-0.4.0 lib/string.rb
wordle-0.3.0 lib/string.rb
wordle-0.2.1 lib/string.rb
wordle-0.2.0 lib/string.rb
wordle-0.1.1 lib/string.rb
wordle-0.1.0 lib/string.rb