Skip to content

Commit

Permalink
Fix Colorize.enabled?'s documentation (#14258)
Browse files Browse the repository at this point in the history
  • Loading branch information
HertzDevil authored Jan 29, 2024
1 parent bc0c872 commit 57d67c2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/colorize.cr
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ module Colorize
# "hello".colorize.red.to_s # => "hello"
# ```
#
# NOTE: This is by default disabled on non-TTY devices because they likely don't support ANSI escape codes.
# This will also be disabled if the environment variable `TERM` is "dumb" or `NO_COLOR` contains any value.
# NOTE: This is by default disabled if the environment variable `NO_COLOR` contains any value.
class_property? enabled : Bool { !ENV.has_key?("NO_COLOR") }

# Makes `Colorize.enabled` `true` if and only if both of `STDOUT.tty?`
Expand Down

0 comments on commit 57d67c2

Please sign in to comment.