aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/relations/take.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel/relations/take.rb')
-rw-r--r--lib/arel/relations/take.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/arel/relations/take.rb b/lib/arel/relations/take.rb
new file mode 100644
index 0000000000..d2743d7a6e
--- /dev/null
+++ b/lib/arel/relations/take.rb
@@ -0,0 +1,15 @@
+module Arel
+ 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 \ No newline at end of file