diff options
Diffstat (limited to 'lib/arel/algebra/extensions/object.rb')
-rw-r--r-- | lib/arel/algebra/extensions/object.rb | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/lib/arel/algebra/extensions/object.rb b/lib/arel/algebra/extensions/object.rb index efdbbf525f..80d68df177 100644 --- a/lib/arel/algebra/extensions/object.rb +++ b/lib/arel/algebra/extensions/object.rb @@ -1,20 +1,23 @@ -class Object - def bind(relation) - Arel::Value.new(self, relation) - end +module Arel + module ObjectExtensions + def bind(relation) + Arel::Value.new(self, relation) + end - def find_correlate_in(relation) - bind(relation) - end + def find_correlate_in(relation) + bind(relation) + end - def metaclass - class << self - self + def metaclass + class << self + self + end end - end - def let - yield(self) + def let + yield(self) + end + + Object.send(:include, self) end end - |