Class: GOM::Storage::ElasticSearch::Draft::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/gom/storage/elastic_search/draft/builder.rb

Overview

Builds a draft out of a search result item document.

Instance Method Summary collapse

Constructor Details

#initialize(item) ⇒ Builder

Returns a new instance of Builder.



5
6
7
# File 'lib/gom/storage/elastic_search/draft/builder.rb', line 5

def initialize(item)
  @item = hashed item
end

Instance Method Details

#draftObject



9
10
11
12
13
14
15
# File 'lib/gom/storage/elastic_search/draft/builder.rb', line 9

def draft
  initialize_draft
  set_object_id
  set_class
  set_properties_and_relations
  @draft
end