lib/tasks.rb
# == display tasks progress
# === Returns
# return progress
display tasks progress
Returns
return progress
display tasks progress Returns return progress
def progress
        total_count = get_tasks.size
        dones_count = dones.size
        percent = total_count == 0 ? 0 : percentage(dones_count, total_count)
        prefix = "#{dones_count}/#{total_count}|"
        done_bar = '=' * (percent / 10)
        rest_bar = ' ' * (10 - (percent / 10))
        progress_bar = "#{done_bar}>#{rest_bar}"
        sufix = "|#{percent}%"
        "#{prefix}#{progress_bar}#{sufix}"
      end
def progress total_count = get_tasks . size dones_count = dones . size percent = total_count == 0 ? 0 : percentage ( dones_count , total_count ) prefix = "#{dones_count}/#{total_count}|" done_bar = '=' * ( percent / 10 ) rest_bar = ' ' * ( 10 - ( percent / 10 ) ) progress_bar = "#{done_bar}>#{rest_bar}" sufix = "|#{percent}%" "#{prefix}#{progress_bar}#{sufix}" end
display tasks progress
 Returns
return progress
display tasks progress Returns return progress