"No one is harder on a talented person than the person themselves" - Linda Wilkinson ; "Trust your guts and don't follow the herd" ; "Validate direction not destination" ;

September 04, 2012

Ruby Getting Started


This post is about learning ruby. Tried it online using rubyfiddle. rubbyfiddle did not work with global variables i.e Variables using $ symbol.

Basic Commands

Very Usual Hello World Example


Dynamic Typing



Global variables didn't work using ruby fiddle. Installed ruby for Windows. Using Interactive Ruby Option under Programs->Ruby tried below examples

While Loop


Next example is trying out for loop. Below is the test file


Start Command Prompt with Ruby. Run the test file


Pretty easy to learn. Looking forward for more interesting posts.

More Reads
Ruby Tutorial with Code Samples
A Wealth Of Ruby Loops And Iterators
Ruby Procs And Lambdas (And The Difference Between Them)
A Unit Testing Framework In 44 Lines Of Ruby


Happy Learning!!!

No comments: