Method: Elasticsearch::Model::Response::Records#initialize

Defined in:
lib/elasticsearch/model/response/records.rb

#initialize(klass, response, options = {}) ⇒ Records

Returns a new instance of Records.

See Also:



38
39
40
41
42
43
44
45
46
47
48
# File 'lib/elasticsearch/model/response/records.rb', line 38

def initialize(klass, response, options={})
  super

  # Include module provided by the adapter in the singleton class ("metaclass")
  #
  adapter = Adapter.from_class(klass)
  metaclass = class << self; self; end
  metaclass.__send__ :include, adapter.records_mixin

  self.options = options
end