learning from a ruby tutorial