botanicus/now-task-manager

View on GitHub
bin/now

Summary

Maintainability
Test Coverage
#!/usr/bin/env ruby
# frozen_string_literal: true

require 'import'
require 'pomodoro/commands'

commander = Pomodoro::Commander.new
command_name = ARGV.first&.to_sym

if commander.commands.include?(command_name)
  commander.run(command_name, ARGV[1..-1] || Array.new)
elsif [:'-h', :'--help'].include?(command_name)
  puts(commander.help)
else
  abort(commander.help)
end