Class: TogglRedmineComparator
- Inherits:
-
Object
- Object
- TogglRedmineComparator
- Defined in:
- lib/renuo/cli/app/toggl_redmine_comparator.rb
Overview
rubocop:disable Metrics/ClassLength
Class Method Summary collapse
Class Method Details
.call(days_behind = 7) ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/renuo/cli/app/toggl_redmine_comparator.rb', line 17 def call(days_behind = 7) report = {} since_date = days_behind.days.before(Date.yesterday).strftime("%F") until_date = Date.yesterday.strftime("%F") extract_redmine(report, since_date, until_date) extract_toggl(report, since_date, until_date) report = report.sort.reverse.to_h print_table(report) report end |