Method: CommandKit::Colors#colors
- Defined in:
- lib/command_kit/colors.rb
#colors(stream = stdout) {|color| ... } ⇒ ANSI, PlainText
Returns the colors available for the given stream.
1027 1028 1029 1030 1031 1032 1033 1034 |
# File 'lib/command_kit/colors.rb', line 1027 def colors(stream=stdout) color = if ansi?(stream) then ANSI else PlainText end yield color if block_given? return color end |