Use this gem to match attributes between your object instances. It basically returns the percentage of attributes matched between two instances.
>= 0
Jonas Scherer