aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-07-30 19:05:41 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-07-30 19:05:41 -0700
commit34303cc6176f47c1359a2fca8f50365e601509f0 (patch)
tree64b663f68b1ced77746811426e27e5994e6cdcbc /lib/arel
parent020b03749fff4b1fcea52553846ece822ea8e840 (diff)
downloadrails-34303cc6176f47c1359a2fca8f50365e601509f0.tar.gz
rails-34303cc6176f47c1359a2fca8f50365e601509f0.tar.bz2
rails-34303cc6176f47c1359a2fca8f50365e601509f0.zip
removing module for faster method lookup
Diffstat (limited to 'lib/arel')
-rw-r--r--lib/arel/algebra/expression.rb23
1 files changed, 10 insertions, 13 deletions
diff --git a/lib/arel/algebra/expression.rb b/lib/arel/algebra/expression.rb
index 5a93ca9735..f7ba57a757 100644
--- a/lib/arel/algebra/expression.rb
+++ b/lib/arel/algebra/expression.rb
@@ -20,20 +20,17 @@ module Arel
formatter.expression self
end
- module Transformations
- def as(aliaz)
- self.class.new(attribute, aliaz, self)
- end
-
- def bind(new_relation)
- new_relation == relation ? self : self.class.new(attribute.bind(new_relation), @alias, self)
- end
-
- def to_attribute(relation)
- Attribute.new(relation, @alias, :ancestor => self)
- end
+ def as(aliaz)
+ self.class.new(attribute, aliaz, self)
+ end
+
+ def bind(new_relation)
+ new_relation == relation ? self : self.class.new(attribute.bind(new_relation), @alias, self)
+ end
+
+ def to_attribute(relation)
+ Attribute.new(relation, @alias, :ancestor => self)
end
- include Transformations
end
class Count < Expression