Module: DevSuite::Utils::Color

Defined in:
lib/dev_suite/utils/color.rb,
lib/dev_suite/utils/color/color.rb,
lib/dev_suite/utils/color/config.rb,
lib/dev_suite/utils/color/palette.rb,
lib/dev_suite/utils/color/strategy.rb,
lib/dev_suite/utils/color/colorizer.rb,
lib/dev_suite/utils/color/palette/base.rb,
lib/dev_suite/utils/color/strategy/rgb.rb,
lib/dev_suite/utils/color/config/config.rb,
lib/dev_suite/utils/color/strategy/base.rb,
lib/dev_suite/utils/color/strategy/basic.rb,
lib/dev_suite/utils/color/strategy/theme.rb,
lib/dev_suite/utils/color/palette/default.rb,
lib/dev_suite/utils/color/palette/palette.rb,
lib/dev_suite/utils/color/strategy/strategy.rb,
lib/dev_suite/utils/color/config/configuration.rb

Defined Under Namespace

Modules: Config, Palette, Strategy Classes: Colorizer

Class Method Summary collapse

Class Method Details

.colorize(text, **kargs) ⇒ Object

Raises:

  • (ArgumentError)


13
14
15
16
17
18
# File 'lib/dev_suite/utils/color/colorizer.rb', line 13

def colorize(text, **kargs)
  raise ArgumentError, "Text to colorize must be a string" unless text.is_a?(String)

  colorizer = Colorizer.new
  colorizer.colorize(text, **kargs)
end