Class: Balboa::CLI::Command::PunchCommand
- Inherits:
-
Object
- Object
- Balboa::CLI::Command::PunchCommand
- Defined in:
- lib/balboa/cli/command/punch_command.rb
Defined Under Namespace
Classes: PunchDate
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(interactor) ⇒ PunchCommand
constructor
A new instance of PunchCommand.
Constructor Details
#initialize(interactor) ⇒ PunchCommand
Returns a new instance of PunchCommand.
10 11 12 |
# File 'lib/balboa/cli/command/punch_command.rb', line 10 def initialize(interactor) @interactor = interactor end |
Instance Method Details
#execute ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/balboa/cli/command/punch_command.rb', line 14 def execute punch_dates.each do |date| $stdout.print("\n#{date.strftime("%d/%m/%Y")}") @interactor.punch(date) unless skip_date?(date) end end |