Class: Cli::Commands::Start

Inherits:
Object
  • Object
show all
Defined in:
lib/cli/commands/start.rb

Class Method Summary collapse

Class Method Details

.call(args) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/cli/commands/start.rb', line 8

def self.call(args)
  case args[0]
  when "new"
    app_name = args[1] || "MyApp"
    app_name = app_name.gsub(/[-\s]/, "_")
    app_name = app_name.split("_").map(&:capitalize).join if app_name.include?("_")
    NewApp::Execute.call(app_name: app_name)
  else
    Kirei::Logging::Logger.logger.info("Unknown command")
  end
end