0.0
No commit activity in last 3 years
No release in over 3 years
simple-identity provides simple identity methods of #eql?, #==, and #hash
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 1.3
>= 0

Runtime

 Project Readme

simple-identity

simple-identity is a Ruby library for providing simple identity methods of #eql?, #==, and #hash.

Gem Version Build Status Coverage Status Code Climate

Installation

$ gem install simple-identity

Usage

class A
  include SimpleIdentity
  attr_accessor :a, :b, :c
  def initialize(a, b, c)
    @a = a
    @b = b
    @c = c
  end
end

A.new(1,2,3) == A.new(1,2,3) # true
A.new(1,2,3) != A.new(3,2,1) # true

License

simple-identity is free software distributed under MIT license.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request