Class: Dry::Equalizer
- Inherits:
-
Module
- Object
- Module
- Dry::Equalizer
- Defined in:
- lib/dry/equalizer.rb,
lib/dry/equalizer/version.rb
Overview
Define equality, equivalence and inspection methods
Defined Under Namespace
Modules: Methods
Constant Summary collapse
- VERSION =
Gem version
'0.3.0'.freeze
Instance Method Summary collapse
-
#initialize(*keys, **options) ⇒ undefined
constructor
private
Initialize an Equalizer with the given keys.
Constructor Details
#initialize(*keys, **options) ⇒ undefined
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.
Initialize an Equalizer with the given keys
Will use the keys with which it is initialized to define #cmp?, #hash, and #inspect
24 25 26 27 28 |
# File 'lib/dry/equalizer.rb', line 24 def initialize(*keys, **) @keys = keys.uniq define_methods(**) freeze end |