Skip to content
/ spinner Public

Terminal Spinner for Crystal Programming Language

License

Notifications You must be signed in to change notification settings

askn/spinner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

notramoaskn
notramo
and
Feb 22, 2018
21d0b9b · Feb 22, 2018

History

15 Commits
Aug 23, 2016
Dec 30, 2015
Dec 28, 2015
Feb 22, 2018
Dec 28, 2015
Dec 28, 2015
Dec 28, 2015
Dec 30, 2015
Jun 21, 2017

Repository files navigation

Spinner

Terminal Spinner for Crystal Programming Language

All

Installation

Add this to your application's shard.yml:

dependencies:
  spinner:
    github: askn/spinner

Usage

require "spinner"

sp = Spin.new
sp.start
sleep 3
sp.stop

Options

delay: default = 0.1

chars: you can choose charset from CHARSET default = Spinner::Charset[:pipe]

Examples

require "spinner"
require "colorize"

chars = Spinner::Charset[:arrow].map do |c|
  c.colorize(:light_green)
end

spin = Spin.new(0.2, chars)
spin.start
sleep 3
spin.stop

Color

Contributing

  1. Fork it ( https://github.com/askn/spinner/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • askn Aşkın Gedik - creator, maintainer