aboutsummaryrefslogtreecommitdiffstats
path: root/lib/active_relation/relations/alias.rb
blob: 4cb4913da5f26255ec064dd6c31387be98b47e9c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
module ActiveRelation
  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