naive_bayes/resources/ruby/scope.rb
# Iterate through documents returned by a query with this +Scope+.
#
# @return [Enumerator] The enumerator.
#
# @yieldparam doc [Hash] Each matching document.
Iterate through documents returned by a query with this +Scope+.
Iterate through documents returned by a query with this + Scope + .
def each
      enum = cursor.to_enum
      enum.each do |doc|
        yield doc
      end if block_given?
      enum
    end
def each enum = cursor . to_enum enum . each do | doc | yield doc end if block_given? enum end
Iterate through documents returned by a query with this +Scope+.
Iterate through documents returned by a query with this + Scope + .
None
Enumerator
doc
<not_specific>
Each matching document.
Each matching document .