![]() | organize ruby code |
|
10 Feb 2012, 09:28
Larry Cai (8 posts) |
Hi: It is a nice book to concentrate the command line tool, and I have a question when after quickly reading. In the book, it goes to sample codes directly. And I want to see how to organize the ruby tool in the beginning, like whether we should write like below #!/usr/bin/env ruby options handling def methods end def methods end def main end main |
|
10 Feb 2012, 17:22
David Copeland (85 posts) |
I’m not sure what you mean “in the beginning”, but the book should ultimately describe a format for the bin file that is:
Is that what you’re looking for? |
|
12 Feb 2012, 15:56
Larry Cai (8 posts) |
Thanks. Yes, this is what I want to, and want to see in the beginning of the book. And I can’t find your sample and related description when I searched in the ebook (b6_0). |
|
17 Feb 2012, 13:51
David Copeland (85 posts) |
Yeah, I think this is only alluded to in the book; it could probably be better called out, but this post on my blog, while focused on the Methadone CLI library, might give you some more info: http://www.naildrivin5.com/blog/2011/12/19/meth… |
|
09 Mar 2012, 05:09
Larry Cai (8 posts) |
even better, start to use the tips |
| You must be logged in to comment |

