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.

Like what you see? This is just a taste of RubyTapas! Sign up today to get two videos a week, along with full source code and transcripts. Or click here to learn more.