aboutsummaryrefslogtreecommitdiffstats
path: root/lib/active_relation/relations/take.rb
blob: d9d439b3f5627a4efc4a67f076674556f6b99413 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module ActiveRelation
  class Take < Compound
    attr_reader :taken

    def initialize(relation, taken)
      @relation, @taken = relation, taken
    end

    def ==(other)
      self.class  == other.class    and
      relation    == other.relation and
      taken       == other.taken
    end
  end
end