Skip to content
This repository was archived by the owner on Nov 4, 2018. It is now read-only.

mhib/equalizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Equalizer Build Status Coverage Status Code Climate Dependency Status Inline docs Seal of approvement

My version of equalizer gem

Installation

Download gem file from this repo and run

gem build equalizer.gem_spec
gem install ./[gem_name]

Usage

require 'equalizer'
class Point
  extend Equalizer
  equalize(:x, :y)
  def initialize(x, y)
    @x = x
    @y = y
  end
end

zero = Point.new(0, 0)
zero == Point.new(0, 0) # => true
zero == Point.new(1, 0) # => false
zero.eql? Point.new(0, 0) # => true
zero.eql? Point.new(1, 0) # => false
zero.equal? Point.new(0, 0) # => false
zero.equal? Point.new(1, 0) # => false
{ zero => 0 }[Point.new(0, 0)] # => 0

Contributing

  1. Fork it ( https://github.com/mhib/equalizer/fork )
  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 a new Pull Request

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages