Method: Commiter::CommiterCli.validate_command_args

Defined in:
lib/commiter.rb

.validate_command_args(option, should_show_debug_messages) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/commiter.rb', line 20

def self.validate_command_args(option, should_show_debug_messages)
  case option
  when "-h"
    print_help_messages(true)
  when "-help"
    print_help_messages(true)
  when "--help"
    print_help_messages(true)
  when "-debug"
    @options[:verbose] = true
  when "-c"
    @options[:syntax_highlighting] = true
  when "-g"
    if should_show_debug_messages
      puts "Command [-g] Accepted Will Start Asking Questions Before Update Git Rules"
    end
  when "-q"
    if should_show_debug_messages
      puts "Command [-q] Accepted Generate Quick Git Messages Rules"
    end
  when "-c"
    if should_show_debug_messages
      puts "Command [-c] Accepted Generate Config File"
    end
  when "-d"
    if should_show_debug_messages
      puts "Command [-d] Accepted Will Show Debug Messages"
    end
  else
    puts "Command : [#{option} Rejected Use Cli -h To See The Supported Commands]"
  end

end