From 2f6ae7592ff20c8ce02113f3d349b67911103023 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 20 Jul 2010 16:51:25 -0700 Subject: refactor to use inheritence --- lib/arel/algebra/relations/operations/from.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/arel/algebra') diff --git a/lib/arel/algebra/relations/operations/from.rb b/lib/arel/algebra/relations/operations/from.rb index 6bfd68dfc9..fbddb4234f 100644 --- a/lib/arel/algebra/relations/operations/from.rb +++ b/lib/arel/algebra/relations/operations/from.rb @@ -1,6 +1,10 @@ module Arel class From < Compound - attributes :relation, :sources - deriving :initialize, :== + attr_reader :sources + + def initialize relation, sources + super(relation) + @sources = sources + end end end -- cgit v1.2.3