Category Archives: Ruby

Ruby For Java (and C#) Programmers, Part 3 – Introducing Arrays, Hashes and the typing system 12

Following on from Part 2, we look at two of Ruby’s most important collection classes, Hashes and Arrays, as well as have a brief look at the typing system. Update 1: Fixed typo, thanks Anjan – any day now I’ll stop writing this stuff so late at night I’m too tired to proof read. Update [...]

Ruby For Java (and C#) Programmers, Part 2 – Operators, methods, and more on classes 6

Update: Fixed bonehead misunderstanding on my part, thanks to Daniel spotting it, and a typo thanks to riffraff. I left a few loose ends from Part 1, so I’m moving a discussion on the type system to Part 3 so I can revisit methods and classes. Returning from methods In the normal way, you can [...]

Ruby For Java (and C#) Programmers, Part 1 – Conventions, methods, modules, and classes 20

In the first part, I’m just going to be covering the basics. Conventions Before we start, some coding conventions. Firstly, CamelCase for methods and variable names is out – for Ruby it’s lowercase and underscores all the way – it_is_this_way, itIsNotThisWay. Classes and Modules (of which more later) should start with an uppercase letter, but [...]