Method: TaskFormatter#time_bar
- Defined in:
- lib/task_formatter.rb
#time_bar(full_char = '=', empty_char = ' ', ellipsis = '...') ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/task_formatter.rb', line 21 def (full_char = '=', empty_char = ' ', ellipsis = '...') time_len = [@task.duration / 300, ].min if time_len >= "[#{(full_char * (time_len - 2)) + ellipsis}" else "[#{full_char * time_len}#{empty_char * (bar_size - time_len)}]" end end |