Merge pull request #197 from eatoncns/master

Correct spelling of function in Display.ProgressBar
This commit is contained in:
Jay Hayes
2017-06-08 11:25:58 -05:00
committed by GitHub

View File

@@ -3,12 +3,12 @@ defmodule Display.ProgressBar do
@progress_bar_length 30
def progress_bar(%{current: current, total: total}) do
arrow = caluculate_progress(current, total) |> build_arrow
arrow = calculate_progress(current, total) |> build_arrow
"|" <> String.ljust(arrow, @progress_bar_length) <> "| #{current} of #{total}"
end
defp caluculate_progress(current, total) do
defp calculate_progress(current, total) do
round( (current/total) * @progress_bar_length)
end