Class: Esse::NullDocument

Inherits:
Document show all
Defined in:
lib/esse/null_document.rb

Constant Summary

Constants inherited from Document

Document::MUTATIONS_FALLBACK

Instance Attribute Summary

Attributes inherited from Document

#object, #options

Instance Method Summary collapse

Methods inherited from Document

#doc_header, #document_for_partial_update, #eql?, #ignore_on_delete?, #ignore_on_index?, #inspect, #mutate, #mutated_source, #mutations, #routing?, #to_bulk, #to_h, #type?

Constructor Details

#initializeNullDocument

Returns a new instance of NullDocument.



5
6
7
8
# File 'lib/esse/null_document.rb', line 5

def initialize
  @object = nil
  @options = {}
end

Instance Method Details

#idNilClass

Returns the document ID.

Returns:

  • (NilClass)

    the document ID



11
12
13
# File 'lib/esse/null_document.rb', line 11

def id
  nil
end

#metaNilClass

Returns the document meta.

Returns:

  • (NilClass)

    the document meta



26
27
28
# File 'lib/esse/null_document.rb', line 26

def meta
  {}
end

#routingNilClass

Returns the document routing.

Returns:

  • (NilClass)

    the document routing



21
22
23
# File 'lib/esse/null_document.rb', line 21

def routing
  nil
end

#sourceNilClass

Returns the document source.

Returns:

  • (NilClass)

    the document source



31
32
33
# File 'lib/esse/null_document.rb', line 31

def source
  nil
end

#typeNilClass

Returns the document type.

Returns:

  • (NilClass)

    the document type



16
17
18
# File 'lib/esse/null_document.rb', line 16

def type
  nil
end