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/creng.rb', line 23
def run(args)
options = {}
@optparser = RDF::CLI.options do
self.on('-n', '--nodefine', 'Init or build without define statements') do
options[:nodefine] = true
end
self.on('-c', '--noconsole', 'Build without debug messages(console.* calls)') do
options[:noconsole] = true
end
self.on('-b', '--withdevblock', 'Build and extension with blocks of code for development purposes') do
options[:withdevblock] = true
end
end
args = ARGV
@options = options
if !public_methods(false).map(&:to_s).include?(args[0])
puts "unknown command #{args.first}"
else
run_command(args) unless args.empty?
end
end
|