Module: Sinclair::Comparable::ClassMethods
- Defined in:
- lib/sinclair/comparable/class_methods.rb
Overview
Class methods of Sinclair::Comparable
Instance Method Summary collapse
-
#comparable_by(*attributes) ⇒ Set<Symbol,String>
Adds fields to the comparison algorythim.
-
#equals_checker ⇒ Sinclair::EqualsChecker
private
Returns a comparable configured for the class.
Instance Method Details
#comparable_by(*attributes) ⇒ Set<Symbol,String>
Adds fields to the comparison algorythim
19 20 21 |
# File 'lib/sinclair/comparable/class_methods.rb', line 19 def comparable_by(*attributes) equals_checker.add(*attributes) end |
#equals_checker ⇒ Sinclair::EqualsChecker
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a comparable configured for the class
28 29 30 |
# File 'lib/sinclair/comparable/class_methods.rb', line 28 def equals_checker @equals_checker ||= Sinclair::EqualsChecker.new end |