Class: CLIOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/constants/options.rb

Direct Known Subclasses

CLIConstants, Commander

Class Method Summary collapse

Class Method Details

.ascii_artObject



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/constants/options.rb', line 8

def ascii_art
    "
     ________  ________  ___  ___       ________           ________  ________           ________  ________  ___  ___       ________      
    |\\   __  \\|\\   __  \\|\\  \\|\\  \\     |\\   ____\\         |\\   __  \\|\\   ___  \\        |\\   __  \\|\\   __  \\|\\  \\|\\  \\     |\\   ____\\     
    \\ \\  \\|\\  \\ \\  \\|\\  \\ \\  \\ \\  \\    \\ \\  \\___|_        \\ \\  \\|\\  \\ \\  \\\\ \\  \\       \\ \\  \\|\\  \\ \\  \\|\\  \\ \\  \\ \\  \\    \\ \\  \\___|_    
     \\ \\   _  _\\ \\   __  \\ \\  \\ \\  \\    \\ \\_____  \\        \\ \\  \\\\\\  \\ \\  \\\\ \\  \\       \\ \\   _  _\\ \\   __  \\ \\  \\ \\  \\    \\ \\_____  \\   
      \\ \\  \\\\  \\\\ \\  \\ \\  \\ \\  \\ \\  \\____\\|____|\\  \\        \\ \\  \\\\\\  \\ \\  \\\\ \\  \\       \\ \\  \\\\  \\\\ \\  \\ \\  \\ \\  \\ \\  \\____\\|____|\\  \\  
       \\ \\__\\\\ _\\\\ \\__\\ \\__\\ \\__\\ \\_______\\____\\_\\  \\        \\ \\_______\\ \\__\\\\ \\__\\       \\ \\__\\\\ _\\\\ \\__\\ \\__\\ \\__\\ \\_______\\____\\_\\  \\ 
\\|__|\\|__|\\|__|\\|__|\\|__|\\|_______|\\_________\\        \\|_______|\\|__| \\|__|        \\|__|\\|__|\\|__|\\|__|\\|__|\\|_______|\\_________\\
                                  \\|_________|                                                                       \\|_________|                                                                                                                                                   
    "
end

.cli_descriptionsObject



51
52
53
54
55
56
57
58
# File 'lib/constants/options.rb', line 51

def cli_descriptions
    {
        initialize: 'Setup your initial Rails on Rails project',
        generate_model_and_controller: 'Generate a new model migration, fully operational controller, and unit tests for that controller',
        generate_test_seeder: 'Generate a test seeder for your model',
        generate_test_rspec: 'Generate a test spec for your controller',
    }
end

.command_name_methodsObject



41
42
43
44
45
46
47
48
49
# File 'lib/constants/options.rb', line 41

def command_name_methods
    {
        i: :initialize,
        init: :initialize,
        model: :generate_model_and_controller,
        :"test:seeder" => :generate_test_seeder,
        :"test:spec" => :generate_test_rspec,
    }
end

.gem_versionObject



4
5
6
# File 'lib/constants/options.rb', line 4

def gem_version
    "0.1.9"
end

.help_flagsObject



34
35
36
37
38
39
# File 'lib/constants/options.rb', line 34

def help_flags
    {
        :"--help" => true,
        :"-h" => true,
    }
end

.skip_initialize_optionsObject



21
22
23
24
25
26
# File 'lib/constants/options.rb', line 21

def skip_initialize_options
    {
        test: [:initialize_rspec],
        rspec: [:initialize_rspec],
    }
end

.skip_model_controller_optionsObject



28
29
30
31
32
# File 'lib/constants/options.rb', line 28

def skip_model_controller_options
    {
        test: [:generate_test_seeder, :generate_test_rspec],
    }
end