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 [...]
Categories: Ruby
- Published:
- June 16, 2005 – 11:01 pm
- Author:
- By sam
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 [...]
Categories: Ruby
- Published:
- June 15, 2005 – 1:16 pm
- Author:
- By sam
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 [...]
Categories: Ruby
- Published:
- June 13, 2005 – 1:44 pm
- Author:
- By sam