Module: Bundleup::Colors
- Included in:
- CLI
- Defined in:
- lib/bundleup/colors.rb
Class Attribute Summary collapse
-
.enabled ⇒ Object
writeonly
Sets the attribute enabled.
Class Method Summary collapse
Class Attribute Details
.enabled=(value) ⇒ Object (writeonly)
Sets the attribute enabled
13 14 15 |
# File 'lib/bundleup/colors.rb', line 13 def enabled=(value) @enabled = value end |
Class Method Details
.enabled? ⇒ Boolean
15 16 17 18 19 |
# File 'lib/bundleup/colors.rb', line 15 def enabled? return @enabled if defined?(@enabled) @enabled = determine_color_support end |
.plain(str) ⇒ Object
40 41 42 |
# File 'lib/bundleup/colors.rb', line 40 def plain(str) str end |
.strip(str) ⇒ Object
44 45 46 |
# File 'lib/bundleup/colors.rb', line 44 def strip(str) str.gsub(/\033\[[0-9;]*m/, "") end |