Class: OData::Query::Result Private

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/odata/query/result.rb

Overview

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

Represents the results of executing a OData::Query.

Instance Method Summary collapse

Constructor Details

#initialize(query, result) ⇒ Result

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.

Initialize a result with the query and the result.

Parameters:



11
12
13
14
# File 'lib/odata/query/result.rb', line 11

def initialize(query, result)
  @query      = query
  @result     = result
end

Instance Method Details

#each(&block) ⇒ OData::Entity

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.

Provided for Enumerable functionality

Parameters:

  • block (block)

    a block to evaluate

Returns:



19
20
21
22
23
24
25
# File 'lib/odata/query/result.rb', line 19

def each(&block)
  process_results(&block)
  until next_page.nil?
    result = service.execute(next_page_url)
    process_results(&block)
  end
end