Class: GOM::Storage::ElasticSearch::Collection::Fetcher
- Inherits:
-
Object
- Object
- GOM::Storage::ElasticSearch::Collection::Fetcher
- Defined in:
- lib/gom/storage/elastic_search/collection/fetcher.rb
Instance Method Summary collapse
- #drafts ⇒ Object
-
#initialize(results) ⇒ Fetcher
constructor
A new instance of Fetcher.
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
#drafts ⇒ Object
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 |