aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/algebra/attributes/attribute.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-07-27 20:33:59 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-07-27 20:33:59 -0700
commitbf6fbc4591bd7fe696f48f1db06eec714c0ec790 (patch)
tree02fb2cc426e264ff070571efd288bf7dc3bf90ee /lib/arel/algebra/attributes/attribute.rb
parentc9fa1b47f83f6d07b91fe10922b0e8d042933c1f (diff)
downloadrails-bf6fbc4591bd7fe696f48f1db06eec714c0ec790.tar.gz
rails-bf6fbc4591bd7fe696f48f1db06eec714c0ec790.tar.bz2
rails-bf6fbc4591bd7fe696f48f1db06eec714c0ec790.zip
PERF: reducing delegate methods
Diffstat (limited to 'lib/arel/algebra/attributes/attribute.rb')
-rw-r--r--lib/arel/algebra/attributes/attribute.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/arel/algebra/attributes/attribute.rb b/lib/arel/algebra/attributes/attribute.rb
index 0ad9382a52..770e0950c5 100644
--- a/lib/arel/algebra/attributes/attribute.rb
+++ b/lib/arel/algebra/attributes/attribute.rb
@@ -4,12 +4,19 @@ module Arel
class TypecastError < StandardError ; end
class Attribute
attr_reader :relation, :name, :alias, :ancestor
- delegate :engine, :christener, :to => :relation
def initialize(relation, name, options = {})
@relation, @name, @alias, @ancestor = relation, name, options[:alias], options[:ancestor]
end
+ def engine
+ @relation.engine
+ end
+
+ def christener
+ @relation.christener
+ end
+
def == other
super ||
Attribute === other &&