Class: Axiom::Adapter::Arango::Reader

Inherits:
Object
  • Object
show all
Includes:
Adamantium::Flat, Enumerable
Defined in:
lib/axiom/adapter/arango/reader.rb

Overview

A reader to read tuples from the database

Instance Method Summary collapse

Instance Method Details

#eachself, Enumerable<Tuple>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Enumerate tuples

Returns:

  • (self)

    if block given

  • (Enumerable<Tuple>)

    otherwise



18
19
20
21
22
23
24
25
26
# File 'lib/axiom/adapter/arango/reader.rb', line 18

def each
  return to_enum unless block_given?

  cursor.each do |document|
    yield tuple(document)
  end

  self
end