class Elastictastic::Adapter

Constants

Response

Public Class Methods

[](str) click to toggle source
# File lib/elastictastic/adapter.rb, line 11
def self.[](str)
  case str
  when nil then NetHttpAdapter
  when /^[a-z_]+$/ then Elastictastic.const_get("#{str.to_s.classify}Adapter")
  else str.constantize
  end
end
new(host, options = {}) click to toggle source
# File lib/elastictastic/adapter.rb, line 19
def initialize(host, options = {})
  @host = host
  @request_timeout = options[:request_timeout]
  @connect_timeout = options[:connect_timeout]
end