Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/octocatalog-diff/util/colored.rb

Overview

Create colorizing methods in the ‘String’ class, but only if ‘colors_enabled’ has been set.

Constant Summary collapse

COLORS =
{
  'red'    => 31,
  'green'  => 32,
  'yellow' => 33,
  'cyan'   => 36
}.freeze

Class Method Summary collapse

Class Method Details

.colors_enabled=(value) ⇒ Object



19
20
21
# File 'lib/octocatalog-diff/util/colored.rb', line 19

def self.colors_enabled=(value)
  @@colors_enabled = value # rubocop:disable Style/ClassVars
end