Sha256: 9c588d02223ee14306f4b7266d31ba43f57ed9b52288614914e5a0217649de61

Contents?: true

Size: 730 Bytes

Versions: 4

Compression:

Stored size: 730 Bytes

Contents

# lib/gemwarrior/misc/animation.rb
# Animation routine

module Gemwarrior
  module Animation
    def self.run(opts)
      options = {
        :oneline => false, 
        :speed => nil, 
        :alpha => true, 
        :numeric => true, 
        :random => true
      }.merge(opts)

      th = Thread.new do
        print Matrext::process({
          :phrase     => options.fetch(:phrase),
          :oneline    => options.fetch(:oneline),
          :speed      => options.fetch(:speed),
          :alpha      => options.fetch(:alpha),
          :numeric    => options.fetch(:numeric),
          :random     => options.fetch(:random)
        })
      end
      
      return th.join
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
gemwarrior-0.8.6 lib/gemwarrior/misc/animation.rb
gemwarrior-0.8.5 lib/gemwarrior/misc/animation.rb
gemwarrior-0.8.3 lib/gemwarrior/misc/animation.rb
gemwarrior-0.8.2 lib/gemwarrior/misc/animation.rb