https://github.com/dkubb/equalizer
Define equality, equivalency and hash methods automatically
https://github.com/dkubb/equalizer
Keywords from Contributors
dry-rb rack activejob activerecord mvc rubygems crash-reporting rspec static-code-analysis code-formatter
Last synced: about 13 hours ago
JSON representation
Repository metadata
Define equality, equivalency and hash methods automatically
- Host: GitHub
- URL: https://github.com/dkubb/equalizer
- Owner: dkubb
- License: mit
- Created: 2012-08-30T15:16:06.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2024-08-02T03:25:20.000Z (over 1 year ago)
- Last Synced: 2025-11-21T10:04:26.635Z (21 days ago)
- Language: Ruby
- Homepage:
- Size: 151 KB
- Stars: 202
- Watchers: 6
- Forks: 16
- Open Issues: 5
- Releases: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
README.md
equalizer
Module to define equality, equivalence and inspection methods
Examples
class GeoLocation
include Equalizer.new(:latitude, :longitude)
attr_reader :latitude, :longitude
def initialize(latitude, longitude)
@latitude, @longitude = latitude, longitude
end
end
point_a = GeoLocation.new(1, 2)
point_b = GeoLocation.new(1, 2)
point_c = GeoLocation.new(2, 2)
point_a.inspect # => "#<GeoLocation latitude=1 longitude=2>"
point_a == point_b # => true
point_a.hash == point_b.hash # => true
point_a.eql?(point_b) # => true
point_a.equal?(point_b) # => false
point_a == point_c # => false
point_a.hash == point_c.hash # => false
point_a.eql?(point_c) # => false
point_a.equal?(point_c) # => false
Supported Ruby Versions
This library aims to support and is tested against the following Ruby
implementations:
- Ruby 3.1
- Ruby 3.2
- Ruby 3.3
If something doesn't work on one of these versions, it's a bug.
This library may inadvertently work (or seem to work) on other Ruby versions or
implementations, however support will only be provided for the implementations
listed above.
If you would like this library to support another Ruby version or
implementation, you may volunteer to be a maintainer. Being a maintainer
entails making sure all tests run and pass on that implementation. When
something breaks on your implementation, you will be responsible for providing
patches in a timely fashion. If critical issues for a particular implementation
exist at the time of a major release, support for that Ruby version may be
dropped.
Credits
Contributing
See CONTRIBUTING.md for details.
Copyright
Copyright © 2009-2024 Dan Kubb. See LICENSE for details.
Owner metadata
- Name: Dan Kubb
- Login: dkubb
- Email:
- Kind: user
- Description:
- Website:
- Location: Mission, BC, Canada
- Twitter: dkubb
- Company: Betterment
- Icon url: https://avatars.githubusercontent.com/u/133?v=4
- Repositories: 42
- Last ynced at: 2023-04-10T00:16:29.799Z
- Profile URL: https://github.com/dkubb
GitHub Events
Total
- Watch event: 1
Last Year
- Watch event: 1
Committers metadata
Last synced: 8 days ago
Total Commits: 203
Total Committers: 11
Avg Commits per committer: 18.455
Development Distribution Score (DDS): 0.576
Commits in past year: 0
Committers in past year: 0
Avg Commits per committer in past year: 0.0
Development Distribution Score (DDS) in past year: 0.0
| Name | Commits | |
|---|---|---|
| Dan Kubb | d****b@g****m | 86 |
| Erik Michaels-Ober | s****k@g****m | 72 |
| Markus Schirp | m****j@s****m | 20 |
| Markus Schirp | m****j@s****t | 14 |
| snusnu | g****a@g****m | 2 |
| Piotr Solnica | p****a@g****m | 2 |
| Myron Marston | m****n@g****m | 2 |
| Anatoly Chernow | f****e@g****m | 2 |
| Jan Suchal | j****o@j****t | 1 |
| Craig Little | c****l@g****m | 1 |
| Akira Matsuda | r****e@d****p | 1 |
Committer domains:
- dio.jp: 1
- jsmf.net: 1
- seonic.net: 1
- schirp-dso.com: 1
Issue and Pull Request metadata
Last synced: 17 days ago
Total issues: 10
Total pull requests: 21
Average time to close issues: 2 days
Average time to close pull requests: 2 months
Total issue authors: 8
Total pull request authors: 12
Average comments per issue: 3.9
Average comments per pull request: 3.14
Merged pull request: 15
Bot issues: 0
Bot pull requests: 0
Past year issues: 0
Past year pull requests: 1
Past year average time to close issues: N/A
Past year average time to close pull requests: about 4 hours
Past year issue authors: 0
Past year pull request authors: 1
Past year average comments per issue: 0
Past year average comments per pull request: 1.0
Past year merged pull request: 1
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- solnic (3)
- backus (1)
- ch1c0t (1)
- cbandy (1)
- phurni (1)
- botandrose (1)
- sferik (1)
- jsuchal (1)
Top Pull Request Authors
- ch1c0t (4)
- sferik (4)
- mbj (3)
- dkubb (2)
- amatsuda (2)
- ck3g (1)
- craiglittle (1)
- solnic (1)
- markprzepiora (1)
- jsuchal (1)
- myronmarston (1)
- snusnu (1)
Top Issue Labels
- question (1)
Top Pull Request Labels
- enhancement (2)
Package metadata
- Total packages: 3
-
Total downloads:
- rubygems: 251,623,984 total
- Total docker downloads: 1,577,950,072
- Total dependent packages: 73 (may contain duplicates)
- Total dependent repositories: 20,583 (may contain duplicates)
- Total versions: 27
- Total maintainers: 4
gem.coop: equalizer
Module to define equality, equivalence and inspection methods
- Homepage: https://github.com/dkubb/equalizer
- Documentation: http://www.rubydoc.info/gems/equalizer/
- Licenses: MIT
- Latest release: 0.0.11 (published over 10 years ago)
- Last Synced: 2025-12-09T16:30:44.648Z (3 days ago)
- Versions: 10
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 125,832,045 Total
- Docker Downloads: 788,975,036
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 0.076%
- Docker downloads count: 0.119%
- Downloads: 0.187%
- Maintainers (4)
rubygems.org: equalizer
Module to define equality, equivalence and inspection methods
- Homepage: https://github.com/dkubb/equalizer
- Documentation: http://www.rubydoc.info/gems/equalizer/
- Licenses: MIT
- Latest release: 0.0.11 (published over 10 years ago)
- Last Synced: 2025-12-07T18:02:25.712Z (5 days ago)
- Versions: 10
- Dependent Packages: 73
- Dependent Repositories: 20,583
- Downloads: 125,791,939 Total
- Docker Downloads: 788,975,036
-
Rankings:
- Docker downloads count: 0.139%
- Downloads: 0.149%
- Dependent repos count: 0.25%
- Dependent packages count: 0.396%
- Average: 2.016%
- Stargazers count: 4.001%
- Forks count: 7.159%
- Maintainers (4)
proxy.golang.org: github.com/dkubb/equalizer
- Homepage:
- Documentation: https://pkg.go.dev/github.com/dkubb/equalizer#section-documentation
- Licenses: mit
- Latest release: v0.0.11 (published over 10 years ago)
- Last Synced: 2025-12-07T18:02:27.075Z (5 days ago)
- Versions: 7
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Stargazers count: 3.537%
- Forks count: 5.453%
- Average: 7.342%
- Dependent packages count: 9.576%
- Dependent repos count: 10.802%
Dependencies
- devtools >= 0 development
- bundler ~> 1.3, >= 1.3.5 development
- actions/checkout v4 composite
- ruby/setup-ruby v1 composite
- actions/checkout v4 composite
- ruby/setup-ruby v1 composite
- actions/checkout v4 composite
- ruby/setup-ruby v1 composite
- actions/checkout v4 composite
- ruby/setup-ruby v1 composite
Score: 29.057974842159968