sorting the children of an object

http://www.ruby-doc.org/core/classes/Array.html#M002208
Something like:
elements.sort{ |x,y| x.position <=> y.position }