« Variable types in Ruby | Main | String interpretation in Ruby »
March 21, 2008
Some Ruby programming examples from our course
I was giving a Public Ruby Course to a small group at the end of last week ... and having a small group gave me the opportunity to write some demonstrations in front of them. I have now tidied these up and have pleasure in presenting to more Ruby demonstrations:
The compact method - strips out nil members from an array
Writing comparator methods such as "larger" and "smaller" in Ruby
Using a hash to provide a table of counters
Calling another process via a pipe in Ruby
Definition and use of a class in Ruby
Definition and the redefinition of the same function in Ruby
Posted by gje at March 21, 2008 06:22 PM