class Cumulus::Colors
Public: Provides methods for creating strings with different colors in the console.
Public Class Methods
Public: color format a string that describes an added resource
s - the string to format
Returns the formatted string
# File lib/util/Colors.rb, line 20 def self.added(s) self.green(s) end
Public: color format a string that describes the changes in AWS
s - the string to format
Returns the formatted string
# File lib/util/Colors.rb, line 47 def self.aws_changes(s) self.blue(s) end
Public: Create a string that is blue.
s - the string to format
Returns the blue string
# File lib/util/Colors.rb, line 98 def self.blue(s) Colors.colorize(s, @@blue) end
Public: create a string that has a specific color. Will not output color if `colors_enabled` is set to false. This can be set in “configuration.json”
s - the string to format color - the color to use
Returns the formatted string
# File lib/util/Colors.rb, line 67 def self.colorize(s, color) if @@colors_enabled "#{color}#{s}#{@@no_color}" else s end end
Public: Create a string that is green.
s - the string to format
Returns the green string
# File lib/util/Colors.rb, line 89 def self.green(s) Colors.colorize(s, @@green) end
Public: color format a string that describes the local changes
s - the string to format
Returns the formatted string
# File lib/util/Colors.rb, line 56 def self.local_changes(s) self.orange(s) end
Public: Create a string that is orange.
s - the string to format
Returns the orange string
# File lib/util/Colors.rb, line 107 def self.orange(s) Colors.colorize(s, @@orange) end
Public: Create a string that is red.
s - the string to format
Returns the red string
# File lib/util/Colors.rb, line 80 def self.red(s) Colors.colorize(s, @@red) end
Public: color format a string the describes a removed resource
s - the string to format
Returns the formatted string
# File lib/util/Colors.rb, line 38 def self.removed(s) self.red(s) end
Public: color format a string that describes an unmanaged resource
s - the string to format
Returns the formatted string
# File lib/util/Colors.rb, line 29 def self.unmanaged(s) self.red(s) end