aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/extensions/class.rb
blob: 09e6d86ed4be4b7a4ee8e12950b5ad3ed5ae5b1f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
class Class
  def hash_on(delegatee)
    define_method :eql? do |other|
      self == other
    end
    
    define_method :hash do
      @hash ||= delegatee.hash
    end
  end
end