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
|
# File 'lib/chobo/commands.rb', line 23
def self.run args
case args.first
when "new"
if args.length > 1
create(args.last)
else
puts "Please supply a name for the game.".yellow
puts " ex: chobo new my_first_game".yellow
end
when "-v"
print_version()
when "-version"
print_version()
when "help"
print_help()
when nil
puts "Command not found".red
print_help()
when ""
puts "Command not found".red
print_help()
else
puts "Command not found".red
print_help
end
end
|