Class: GOM::Storage::ElasticSearch::Collection::Fetcher

Inherits:
Object
  • Object
show all
Defined in:
lib/gom/storage/elastic_search/collection/fetcher.rb

Instance Method Summary collapse

Constructor Details

#initialize(results) ⇒ Fetcher

Returns a new instance of Fetcher.



4
5
6
# File 'lib/gom/storage/elastic_search/collection/fetcher.rb', line 4

def initialize(results)
  @results = results
end

Instance Method Details

#draftsObject



8
9
10
11
12
13
14
# File 'lib/gom/storage/elastic_search/collection/fetcher.rb', line 8

def drafts
  drafts = [ ]
  @results.each do |item|
    drafts << GOM::Storage::ElasticSearch::Draft::Builder.new(item).draft
  end
  drafts
end