[LRUG] Sorting a hash by value

Paul Robinson paul at iconoplex.co.uk
Tue Jun 17 04:36:56 PDT 2014


On 17 June 2014 12:14, Tom Stuart <tom at codon.com> wrote:

Server = Struct.new(:ami, :name, :time)


Everybody seems to forget about Struct:
http://www.ruby-doc.org/core-2.1.2/Struct.html

On many occasions I've seen classes that have attributes but no methods -
they should clearly be Structs.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20140617/8e068473/attachment-0003.html>


More information about the Chat mailing list