rainbow icon indicating copy to clipboard operation
rainbow copied to clipboard

Add an easy way to enable/disable for a block

Open TylerRick opened this issue 4 months ago • 0 comments

My use case is for methods that I want to add a color option (like many CLI commands have), so that I can easily toggle color as needed. Example:

def inspect(color: Rainbow.enabled)
  Rainbow.with_enabled(color) do
    Rainbow('...').red
  end
end

TylerRick avatar Oct 15 '24 18:10 TylerRick