Class: Noir::Command::Edit::WeeklyReport
- Inherits:
-
Base::Command
- Object
- Base::Command
- Noir::Command::Edit::WeeklyReport
- Extended by:
- Util::Weekly
- Defined in:
- lib/noir/command/edit/weekly_report.rb
Constant Summary collapse
- TimeFormat =
'%Y%m%d'
Constants included from Util::Weekly
Class Method Summary collapse
-
.edit_report(separator_day_of_week, week_diff = 0) ⇒ Object
main method.
- .report_name(separator_day_of_week, week_diff = 0) ⇒ Object
Methods included from Util::Weekly
begin_of_week_separeted, end_of_week_separeted
Methods inherited from Base::Command
check_command_not_found, description, execute, sub_commands
Class Method Details
.edit_report(separator_day_of_week, week_diff = 0) ⇒ Object
main method
13 14 15 |
# File 'lib/noir/command/edit/weekly_report.rb', line 13 def self.edit_report separator_day_of_week, week_diff=0 system("#{Noir::Command::Edit.editor} #{report_name(separator_day_of_week, week_diff)}.txt") end |
.report_name(separator_day_of_week, week_diff = 0) ⇒ Object
7 8 9 10 |
# File 'lib/noir/command/edit/weekly_report.rb', line 7 def self.report_name separator_day_of_week, week_diff=0 [begin_of_week_separeted(separator_day_of_week, week_diff).strftime(TimeFormat), end_of_week_separeted(separator_day_of_week, week_diff).strftime(TimeFormat)].join('_') end |