Hi, I’m trying to rewrite my option parser app in GLI and I’m not sure how to do it.
What I want for the user to type is:
sysinfo get cpu sysinfo set hostname
In the generated scaffold code I tried adding the following:
c.desc ‘Get CPU info c.arg_name ‘cpu’
But I’m not sure how to check whether this argument was passed.
I tried this in the c.action block:
if args == “cpu” puts ‘cpu’ end
But nothing is printed.