Method: WorkingTimes::CLI#start

Defined in:
lib/working_times/cli.rb

#start(comment = '') ⇒ Object Also known as: st



21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/working_times/cli.rb', line 21

def start(comment = '')
  if working?
    puts "You are already on working at #{current_work}."
    puts "To finish this, execute 'wt finish'."
    return
  end

  initialize_term_log

  Record.new(timestamp: DateTime.now, comment: comment).start
  start_work
end