lib/balboa/cli/command/punch_command.rb in balboa-0.1.4 vs lib/balboa/cli/command/punch_command.rb in balboa-0.1.5
- old
+ new
@@ -10,13 +10,14 @@
@interactor = interactor
@cli = cli
end
def execute
- punch_dates.each do |date|
- $stdout.print("\n#{date.strftime("%d/%m/%Y")}")
+ punch_dates.reject! { |date| skip_date?(date) }
- @interactor.punch(date) unless skip_date?(date)
+ punch_dates.each do |date|
+ $stdout.print("\n#{date.strftime('%d/%m/%Y')}")
+ @interactor.punch(date)
end
end
private