Sha256: 3a960afb6b5fea05fe801355e3f3c0316144af4d32527b20a232fb78702a7023
Contents?: true
Size: 446 Bytes
Versions: 26
Compression:
Stored size: 446 Bytes
Contents
#!/usr/bin/env ruby require 'rubygems' require 'isna' class AnsiIteration def initialize transformer @transformer = transformer @count = 0 end def next if @count > 7 @count = 0 end @count += 1 @transformer + @count end end ai = AnsiIteration.new(30) STDIN.each_char do |char| ansi = char.to_s.to_ansi.change_color(ai.next) print ((0..5).to_a.shuffle.first == 1) ? "#{ansi.blink}" : "#{ansi}" end
Version data entries
26 entries across 26 versions & 1 rubygems