<div dir="ltr">Hi Stephen,<div><br></div><div>I agree with Tom and Paul about your data structure not being ideal.</div><div><br></div><div>Anyway, I'd suggest you use #sort_by</div><div><br></div><div></div><div class="markdown-here-wrapper" style>
<pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;margin:1.2em 0px"><code class="language-ruby" style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline;background-color:rgb(248,248,248);white-space:pre;overflow:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block!important;display:block;padding:0.5em;color:rgb(51,51,51);background:rgb(248,248,255)">catalogue.select{|<span class="number" style="color:rgb(0,153,153)">_</span>,v| v[<span class="regexp" style="color:rgb(0,153,38)">/sns-example/</span>]}.sort_by{|<span class="number" style="color:rgb(0,153,153)">_</span>,v| v}
</code></pre>
<div title="MDH:PGRpdj5gYGBydWJ5PC9kaXY+PGRpdj48c3BhbiBzdHlsZT0iZm9udC1mYW1pbHk6IGFyaWFsLCBz
YW5zLXNlcmlmOyBmb250LXNpemU6IDEyLjcyNzI3MjAzMzY5MTQwNnB4OyI+Y2F0YWxvZ3VlPC9z
cGFuPi5zZWxlY3R7fF8sdnwgdlsvc25zLWV4YW1wbGUvXX0uc29ydF9ieXt8Xyx2fCB2fTxicj48
L2Rpdj48ZGl2PmBgYDwvZGl2Pg==" style="height:0;font-size:0em;padding:0;margin:0">​</div></div><div></div><div><br></div><div>Cheers,</div><div><br></div><div>Lorenzo</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Jun 17, 2014 at 12:36 PM, Paul Robinson <span dir="ltr"><<a href="mailto:paul@iconoplex.co.uk" target="_blank">paul@iconoplex.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_extra"><div class=""><div class="gmail_quote">On 17 June 2014 12:14, Tom Stuart <span dir="ltr"><<a href="mailto:tom@codon.com" target="_blank">tom@codon.com</a>></span> wrote:</div>
<div class="gmail_quote">

<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Server = Struct.new(:ami, :name, :time)</blockquote></div>


<br></div>Everybody seems to forget about Struct: <a href="http://www.ruby-doc.org/core-2.1.2/Struct.html" target="_blank">http://www.ruby-doc.org/core-2.1.2/Struct.html</a></div><div class="gmail_extra"><br></div><div class="gmail_extra">
On many occasions I've seen classes that have attributes but no methods - they should clearly be Structs.</div>

</div>
<br>_______________________________________________<br>
Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
<a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
<br></blockquote></div><br></div>