class Elasticsearch::Extensions::Documents::Document

Attributes

index_type[R]
type[R]
object[R]

Public Class Methods

indexes_as_type(type) click to toggle source
# File lib/elasticsearch/extensions/documents/document.rb, line 12
def indexes_as_type(type)
  @index_type = type.to_s
end
new(object) click to toggle source
# File lib/elasticsearch/extensions/documents/document.rb, line 7
def initialize(object)
  @object = object
end

Public Instance Methods

as_hash() click to toggle source
# File lib/elasticsearch/extensions/documents/document.rb, line 24
def as_hash
  raise NotImplementedError, 'A subclass should define this method'
end
id() click to toggle source
# File lib/elasticsearch/extensions/documents/document.rb, line 20
def id
  object.id
end