[ABE.pm] Seeking comments re OOP (Continuing my series of dumb
questions)
Ricardo SIGNES
rjbs-perl-abe at lists.manxome.org
Thu Dec 30 10:03:15 CST 2004
* Randy Kramer <rhkramer at gmail.com> [2004-12-30T10:54:55]
> Thanks! (I'm sure that will make sense to me once I study it (and
> Ruby) a little more. (Clearly, it's not as simple as
> AccountLedger.accounts.sort { puts act.name} which is a useful start.)
Not it isn't. :) That will not sort anything. The block passed to the
sort method is used to compare elements.
You mean, I think:
AccountLedger.accounts.sort.each { |act| puts act.name }
--
rjbs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.pm.org/pipermail/abe-pm/attachments/20041230/d767e1cc/attachment.bin
More information about the ABE-pm
mailing list