aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/relations/alias.rb
blob: 2dab52515f32e9a4bf8faf8490017c857abd8b8d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
module Arel
  class Alias < Compound
    attr_reader :alias
    
    def initialize(relation, aliaz)
      @relation, @alias = relation, aliaz
    end
    
    def alias?
      true
    end
    
    def ==(other)
      self.class == other.class and
      relation   == other.relation and
      @alias     == other.alias
    end
  end
end