spinner-frames.cr v1.0.0
spinner-frames.cr
A collection of spinner framesInstallation
Add this to your application's shard.yml
:
dependencies:
spinner-frames:
github: gtramontina/spinner-frames.cr
version: <version>
Usage
First require it…
require "spinner-frames"
Then you can use the default charset (:line
)…
s = SpinnerFrames.new
5.times { print s.next } # -\|/-
… any of the built-in charsets…
s = SpinnerFrames.new(SpinnerFrames::Charset[:arc])
5.times { print s.next } # ◜◠◝◞◡
… provide a new charset as String
…
s = SpinnerFrames.new("01234")
5.times { print s.next } # 01234
… or as Array(String)
s = SpinnerFrames.new(["[ ]", "[- ]", "[ - ]", "[ -]", "[ ]"])
5.times { print s.next } # [ ][- ][ - ][ -][ ]
Contributing
- Fork it ( https://github.com/gtramontina/spinner-frames.cr/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Related
Repository
spinner-frames.cr
Owner
Statistic
- 11
- 0
- 2
- 2
- 1
- about 1 year ago
- February 5, 2016
License
MIT License
Links
Synced at
Thu, 02 May 2024 23:39:46 GMT
Languages