Charyf/charyf-core

View on GitHub
lib/charyf/utils/commands.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

require_relative 'command'

aliases = {
    'c' => 'console',
    's' => 'server',
    'g' => 'generate',
    'd' => 'destroy'
}

command = ARGV.shift
command = aliases[command] || command

Charyf::Command.invoke command, ARGV