Class: Ella::CLI

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

Overview

The code for handling command-line arguments was getting complicated and ugly, so now it is a class. This is the least-integral part of Ella, and everything here should be replaceable without having to change the non-static classes.

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ CLI

Returns a new instance of CLI.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/ella/cli.rb', line 9

def initialize(args)
  @args = args
  @errors = []

  try_no_args
  try_help
  try_new_project
  try_mvc
  try_destroy
  try_server
  try_test

  exit_with_help('Ella does not understand your command.')
end