Module: OData4::Query::Result::JSON Private
- Defined in:
- lib/odata4/query/result/json.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Represents the results of executing a OData4::Query.
Instance Method Summary collapse
- #error_message ⇒ Object private
- #next_page ⇒ Object private
- #next_page_url ⇒ Object private
- #process_results(&block) ⇒ Object private
Instance Method Details
#error_message ⇒ Object
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.
22 23 24 |
# File 'lib/odata4/query/result/json.rb', line 22 def result_json['error'].andand['message'] end |
#next_page ⇒ Object
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.
14 15 16 |
# File 'lib/odata4/query/result/json.rb', line 14 def next_page result_json['@odata.nextLink'] end |
#next_page_url ⇒ Object
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.
18 19 20 |
# File 'lib/odata4/query/result/json.rb', line 18 def next_page_url next_page.gsub(service.service_url, '') end |
#process_results(&block) ⇒ Object
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.
7 8 9 10 11 12 |
# File 'lib/odata4/query/result/json.rb', line 7 def process_results(&block) find_entities.each do |entity_json| entity = OData4::Entity.from_json(entity_json, ) block_given? ? block.call(entity) : yield(entity) end end |