Class: Markdo::SummaryCommand
- Defined in:
- lib/markdo/summary_command.rb
Instance Method Summary collapse
Methods inherited from Command
Constructor Details
This class inherits a constructor from Markdo::Command
Instance Method Details
#run ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/markdo/summary_command.rb', line 11 def run commands = [OverdueCommand, StarCommand, TodayCommand, TomorrowCommand] commands.each do |command| out = StringIO.new command.new(out, @stderr, @env).run title = command.to_s.sub(/^Markdo::/, '').sub(/Command$/, '') lines = out.string.split("\n") sum = lines.length.inspect @stdout.puts("#{title}: #{sum}") end end |