attr_comparable gem available on RubyGems

9 views
Skip to first unread message

Colin Kelley

unread,
Aug 13, 2013, 1:50:23 AM8/13/13
to sbon...@googlegroups.com
Hey everyone,

I finally got around to publishing this gem.  It makes it trivial to make value classes Comparable because it includes that module for you and writes the needed <=> operator for you based on your declaration of which attributes to compare and in what precedence.  It even handles nil values which are especially painful to account for when writing <=> by hand.


-Colin

Ross Hale

unread,
Aug 14, 2013, 2:44:49 AM8/14/13
to Colin Kelley, sbonrails
Looking good Colin!  How's everything up in SB?

__

Ross Hale
Director, Los Angeles
Pivotal Labs
631 Wilshire Blvd, Santa Monica, CA 90401


--
You received this message because you are subscribed to the Google Groups "sbonrails" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sbonrails+...@googlegroups.com.
To post to this group, send email to sbon...@googlegroups.com.
Visit this group at http://groups.google.com/group/sbonrails.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages