Class: GamesParadise::Commandline
- Inherits:
-
Base
- Object
- Base
- GamesParadise::Commandline
show all
- Defined in:
- lib/games_paradise/commandline/commandline.rb
Constant Summary
Constants inherited
from Base
Base::CONTROL_C_CODE, Base::N
Instance Method Summary
collapse
Methods inherited from Base
#cat, #commandline_arguments?, #efancy, #eparse, #first_argument?, #forestgreen, #gold, #lightblue, #lightgreen, #mediumorchid, #mediumslateblue, #opnn, #peru, #register_sigint, #reset, #rev, #royalblue, #set_commandline_arguments, #sfile, #steelblue, #teal, #tomato, #yellow
Methods included from BaseModule
#cliner, #commandline_arguments?, #first_argument?, #infer_the_namespace, #namespace?, #rename_file, #reset_the_internal_hash, #return_pwd, #set_commandline_arguments
Constructor Details
#initialize(i = ARGV) ⇒ Commandline
24
25
26
27
28
29
30
|
# File 'lib/games_paradise/commandline/commandline.rb', line 24
def initialize(
i = ARGV
)
reset
set_commandline_arguments(i)
run
end
|
Instance Method Details
#do_start_vier_gewinnt ⇒ Object
#
do_start_vier_gewinnt
#
67
68
69
70
|
# File 'lib/games_paradise/commandline/commandline.rb', line 67
def do_start_vier_gewinnt
require 'games_paradise/vier_gewinnt/vier_gewinnt.rb'
GamesParadise::VierGewinnt.new(ARGV)
end
|
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
# File 'lib/games_paradise/commandline/commandline.rb', line 42
def (
i = commandline_arguments?
)
if i.is_a? Array
i.each {|entry| (entry) }
else
case i when /-?-?vier(-|_| )?gewinnt?$/i
do_start_vier_gewinnt
when /-?-?help$/i
show_help
exit
end
end
end
|
#run ⇒ Object
75
76
77
|
# File 'lib/games_paradise/commandline/commandline.rb', line 75
def run
(commandline_arguments?)
end
|
#show_help ⇒ Object
35
36
37
|
# File 'lib/games_paradise/commandline/commandline.rb', line 35
def show_help
e 'No help options are documented so far for this class.'
end
|