Method: String#normalize_color

Defined in:
lib/howzit/colors.rb

#normalize_colorString

Normalize a color name, removing underscores, replacing "bright" with "bold", and converting bgbold to boldbg

Returns:

  • (String)

    Normalized color name



129
130
131
# File 'lib/howzit/colors.rb', line 129

def normalize_color
  gsub(/_/, '').sub(/bright/i, 'bold').sub(/bgbold/, 'boldbg')
end