./lib/ambition/enumerable.rb in ambition-0.1.2 vs ./lib/ambition/enumerable.rb in ambition-0.1.3

- old
+ new

@@ -3,7 +3,24 @@ include ::Enumerable def each(&block) find(:all, query_context.to_hash).each(&block) end + + def any?(&block) + select(&block).size > 0 + end + + def all?(&block) + size == select(&block).size + end + + def empty? + size.zero? + end + + def entries + find(:all, query_context.to_hash) + end + alias_method :to_a, :entries end end