diff options
Diffstat (limited to 'lib/arel/relations/operations/take.rb')
-rw-r--r-- | lib/arel/relations/operations/take.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/arel/relations/operations/take.rb b/lib/arel/relations/operations/take.rb new file mode 100644 index 0000000000..0a49891aee --- /dev/null +++ b/lib/arel/relations/operations/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) + Take === other and + relation == other.relation and + taken == other.taken + end + end +end
\ No newline at end of file |