Class: Abt::Providers::Harvest::Commands::Stop

Inherits:
BaseCommand show all
Defined in:
lib/abt/providers/harvest/commands/stop.rb

Instance Attribute Summary

Attributes inherited from BaseCommand

#config, #path

Attributes inherited from BaseCommand

#ari, #cli, #flags

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseCommand

#initialize

Methods inherited from BaseCommand

flags, #initialize

Constructor Details

This class inherits a constructor from Abt::Providers::Harvest::BaseCommand

Class Method Details

.descriptionObject



12
13
14
# File 'lib/abt/providers/harvest/commands/stop.rb', line 12

def self.description
  "Stop running harvest tracker"
end

.usageObject



8
9
10
# File 'lib/abt/providers/harvest/commands/stop.rb', line 8

def self.usage
  "abt stop harvest"
end

Instance Method Details

#performObject



16
17
18
19
20
21
22
23
# File 'lib/abt/providers/harvest/commands/stop.rb', line 16

def perform
  abort("No running time entry") if time_entry.nil?

  stop_time_entry

  warn("Harvest time entry stopped")
  print_task(project, task)
end