fjord/main.rb

9 lines
174 B
Ruby
Raw Normal View History

2024-03-27 22:31:58 +09:00
module Rainbowable
def rainbow
to_s.each_char.map.with_index do |char, count|
color = 31 + count % 6
"\e[#{color}m#{char}"
end.join + "\e[0m"
2024-03-25 22:14:46 +09:00
end
2024-03-16 22:40:05 +09:00
end