Today’s freebie (episode 55, if you’re counting) covers a simple technique for making a single .rb file work as either a library or a runnable script. In the process, it covers the __FILE__ constant and the $PROGRAM_NAME variable.


[boilerplate bypath=”rubytapas-sample”]

Published by Avdi Grimm

Leave a Reply

Your email address will not be published. Required fields are marked *