Module: AttrComparable
- Includes:
- Comparable
- Defined in:
- lib/attr_comparable.rb,
lib/attr_comparable/version.rb
Overview
Mix-in to make a class Comparable
Use attr_comparabie <attribute list> to declare the attributes which should be compared, and the order they should be Attributes may be nil; nil attributes sort earlier than non-nil to match the SQL convention
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- VERSION =
'0.0.1'
Class Method Summary collapse
Class Method Details
.included(base_class) ⇒ Object
41 42 43 |
# File 'lib/attr_comparable.rb', line 41 def self.included(base_class) base_class.extend ClassMethods end |