Skip to content

Add an easy way to enable/disable for a block #133

Description

@TylerRick

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions