Module Colorator
In: lib/colorator.rb

Methods

Constants

VERSION = "1.1.0"
ANSI_MATCHR = /\x1b.*?[jkmsuABGKH]/  
ANSI_COLORS = { :black => 30, :red => 31, :green => 32, :yellow => 33, :blue => 34, :magenta => 35, :cyan => 36, :white => 37, :bold => 1
CORE_METHODS = ( public_methods - Object.methods  

Public Instance methods


Jump the cursor, moving it up and then back down to it‘s spot, allowing you to do fancy things like multiple output (downloads) the way that Docker does them in an async way without breaking term.



Clear the screen‘s current view, so the user gets a clean output.



Allows you to check if a string currently has ansi.


has_color?(str)

Alias for has_ansi?

reset_color(str = "")

Alias for reset_ansi


Strip ANSI from the current string, making it just a normal string.


strip_color(str)

Alias for strip_ansi

[Validate]