Sha256: 4cedc30b194b4b1eda79ccaf2a7ff7319f71155a286b458d9977fe3bab43a492

Contents?: true

Size: 372 Bytes

Versions: 18

Compression:

Stored size: 372 Bytes

Contents

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

  def tdf_red
    tdf_colorize(31)
  end

  def tdf_green
    tdf_colorize(32)
  end

  def tdf_yellow
    tdf_colorize(33)
  end

  def tdf_blue
    tdf_colorize(34)
  end

  def tdf_pink
    tdf_colorize(35)
  end

  def tdf_light_blue
    tdf_colorize(36)
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
cocoapods-tdf-bin-0.0.43 lib/cocoapods-tdf-bin/helpers/string_helper.rb
cocoapods-tdf-bin-0.0.42 lib/cocoapods-tdf-bin/helpers/string_helper.rb
cocoapods-tdf-bin-0.0.41 lib/cocoapods-tdf-bin/helpers/string_helper.rb
cocoapods-tdf-bin-0.0.40 lib/cocoapods-tdf-bin/helpers/string_helper.rb
cocoapods-tdf-bin-0.0.39 lib/cocoapods-tdf-bin/helpers/string_helper.rb
cocoapods-tdf-bin-0.0.37 lib/cocoapods-tdf-bin/helpers/string_helper.rb
cocoapods-tdf-bin-0.0.36 lib/cocoapods-tdf-bin/helpers/string_helper.rb
cocoapods-tdf-bin-0.0.35 lib/cocoapods-tdf-bin/helpers/string_helper.rb
cocoapods-tdf-bin-0.0.34 lib/cocoapods-tdf-bin/helpers/string_helper.rb
cocoapods-tdf-bin-0.0.33 lib/cocoapods-tdf-bin/helpers/string_helper.rb
cocoapods-tdf-bin-0.0.32 lib/cocoapods-tdf-bin/helpers/string_helper.rb
cocoapods-tdf-bin-0.0.31 lib/cocoapods-tdf-bin/helpers/string_helper.rb
cocoapods-tdf-bin-0.0.30 lib/cocoapods-tdf-bin/helpers/string_helper.rb
cocoapods-tdf-bin-0.0.29 lib/cocoapods-tdf-bin/helpers/string_helper.rb
cocoapods-tdf-bin-0.0.28 lib/cocoapods-tdf-bin/helpers/string_helper.rb
cocoapods-tdf-bin-0.0.26 lib/cocoapods-tdf-bin/helpers/string_helper.rb
cocoapods-tdf-bin-0.0.25 lib/cocoapods-tdf-bin/helpers/string_helper.rb
cocoapods-tdf-bin-0.0.24 lib/cocoapods-tdf-bin/helpers/string_helper.rb