Sha256: ed5b17df9ffbe5e0e58744f7f33579f1d7e3cc4e74c48adcbbc9819acfba0218
Contents?: true
Size: 836 Bytes
Versions: 18
Compression:
Stored size: 836 Bytes
Contents
# frozen_string_literal: true class Sinclair module Comparable # @api public # @author darthjee # # Class methods of {Sinclair::Comparable} # # @example (see Sinclair::Comparable) module ClassMethods # Adds fields to the comparison algorythim # # @param attributes [Array<Symbol>] attributes to be added to comparison # # @see Sinclair::EqualsChecker # @return (see Sinclair::EqualsChecker#add) # @example (see Sinclair::Comparable) def comparable_by(*attributes) equals_checker.add(*attributes) end # @api private # # Returns a comparable configured for the class # # @return [Sinclair::EqualsChecker] def equals_checker @equals_checker ||= Sinclair::EqualsChecker.new end end end end
Version data entries
18 entries across 18 versions & 1 rubygems