Sha256: 1ed4479ed3db33cc783755ca5d118e1eb7bf9f691f68cb157318084e580471fc

Contents?: true

Size: 725 Bytes

Versions: 10

Compression:

Stored size: 725 Bytes

Contents

# lib/gemwarrior/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

10 entries across 10 versions & 1 rubygems

Version Path
gemwarrior-0.8.1 lib/gemwarrior/misc/animation.rb
gemwarrior-0.8.0 lib/gemwarrior/misc/animation.rb
gemwarrior-0.7.9 lib/gemwarrior/misc/animation.rb
gemwarrior-0.7.8 lib/gemwarrior/misc/animation.rb
gemwarrior-0.7.7 lib/gemwarrior/misc/animation.rb
gemwarrior-0.7.6 lib/gemwarrior/misc/animation.rb
gemwarrior-0.7.5 lib/gemwarrior/misc/animation.rb
gemwarrior-0.7.4 lib/gemwarrior/misc/animation.rb
gemwarrior-0.7.3 lib/gemwarrior/misc/animation.rb
gemwarrior-0.7.2 lib/gemwarrior/misc/animation.rb