motion/cdq/collection_proxy.rb in cdq-1.0.2 vs motion/cdq/collection_proxy.rb in cdq-1.0.3

- old
+ new

@@ -20,11 +20,15 @@ def array @objects end - def first - @objects.first + def first(n = 1) + n == 1 ? @objects.first : @objects.first(n) + end + + def last(n = 1) + n == 1 ? @objects.last : @objects.last(n) end end end