Method: Elasticsearch::Model::Adapter::Adapter#adapter

Defined in:
lib/elasticsearch/model/adapter.rb

#adapterObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns the adapter module



150
151
152
153
154
155
# File 'lib/elasticsearch/model/adapter.rb', line 150

def adapter
  @adapter ||= begin
    self.class.adapters.find( lambda {[]} ) { |name, condition| condition.call(klass) }.first \
    || Elasticsearch::Model::Adapter::Default
  end
end