class Array

Public Instance Methods

bold!() click to toggle source

Make every single character in array bold

Example

# Use on array
['N', 'o', 't', 'h', 'i', 'n', 'g', '.'].bold!

# File lib/magic_conch_shell/colorize.rb, line 97
def bold!
  map! { |chr| "\e[1m#{chr}\e[22m" }
end
color_randomize!() click to toggle source

Colorizes every single character randomly in array of strings

Example

# Use on Array
['Y', 'e', 's', '.'].color_randomize!

# File lib/magic_conch_shell/colorize.rb, line 110
def color_randomize!
  map! { |chr| "\e[#{rand(31..37)}m#{chr}\e[0m" }
end
upcase!() click to toggle source

Makes every single character in array upcase ! DOES NOT WORK PROPERLY YET !

# File lib/magic_conch_shell/colorize.rb, line 117
def upcase!
  map! { |chr| chr.upcase }
end