Alternatives for Command Suites
We saw how GLI provides us with the tools to make an awesome command suite, but, like with OptionParser, you might want to do things differently. You may want to provide a much simpler application with less code, sacrificing some power for quicker delivery. In this case, thor is an excellent choice. You may, instead, not want to use a different tool for simple apps as you do for command suites. In this case, main is a good choice, especially if you are transitioning a simple app to a command suite. We’ll look at both of them here by reimplementing todo using each library.
main
Since we just looked at main in the previous section, let’s stay with it and see how it works for command suites. You may have noticed ...
Get Build Awesome Command-Line Applications in Ruby 2 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.