Quantcast
Channel: alvinalexander.com - how
Viewing all articles
Browse latest Browse all 15

How to use Struct to simplify your Ruby class definitions

$
0
0

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.

read more


Viewing all articles
Browse latest Browse all 15

Trending Articles