RubyTapas Freebie: Runnable Library

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”]

Leave a Reply

Your email address will not be published.

Success message!
Warning message!
Error message!