SimpleBar
Summary
Functions
This produces the string with a bar of the correct length to be consumed later
Returns the percentage of completed items
Entry method for simple bar. Pass the total size of the items to process. The module always returns the object you pass it in order to make it pipe-able
Increments the bar by a given amount and returns the item it is given
Functions
Specs
bar(float) :: char_list
This produces the string with a bar of the correct length to be consumed later.
iex> SimpleBar.bar(10) ‘ 10% Done [===========]‘
Specs
percent_done(integer, integer) :: float
Returns the percentage of completed items
Example
iex> SimpleBar.percent_done(1,10) 10.0
Specs
start(any, integer) :: any
Entry method for simple bar. Pass the total size of the items to process. The module always returns the object you pass it in order to make it pipe-able.
Example
iex> SimpleBar.start(:ok,100) :ok