struct

How to use Struct to simplify your Ruby class definitions

Many times when I'm creating a prototype of an application with Ruby I'll create my classes using a simple Struct technique I learned from a friend. This technique of using the Struct class makes my code shorter, and is at least as readable as writing a class out using any other method.

How to open and sort a CSV file with Ruby

Here's the complete source code for a simple Ruby script which performs the following tasks:

Syndicate content