1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/lib/active_relation/extensions/class.rb
2008-03-13 22:46:12 -07:00

17 lines
No EOL
296 B
Ruby

class Class
def abstract(*methods)
methods.each do |method|
define_method method do
raise NotImplementedError
end
end
end
def hash_on(delegatee)
define_method :eql? do |other|
self == other
end
delegate :hash, :to => delegatee
end
end