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

Version Path
ix-cli-0.0.27 bin/ix-glitter
ix-cli-0.0.26 bin/ix-glitter
ix-cli-0.0.25 bin/ix-glitter
ix-cli-0.0.24 bin/ix-glitter
ix-cli-0.0.23 bin/ix-glitter
ix-cli-0.0.22 bin/ix-glitter
ix-cli-0.0.21 bin/ix-glitter
ix-cli-0.0.20 bin/ix-glitter
ix-cli-0.0.19 bin/ix-glitter
ix-cli-0.0.18 bin/ix-glitter
ix-cli-0.0.17 bin/ix-glitter
ix-cli-0.0.16 bin/ix-glitter
ix-cli-0.0.15 bin/ix-glitter
ix-cli-0.0.14 bin/ix-glitter
ix-cli-0.0.13 bin/ix-glitter
ix-cli-0.0.12 bin/ix-glitter
ix-cli-0.0.11 bin/ix-glitter
ix-cli-0.0.10 bin/ix-glitter
ix-cli-0.0.9 bin/ix-glitter
ix-cli-0.0.7 bin/ix-glitter