Class: Traject::SolrPool::Connection::Options

Inherits:
Struct
  • Object
show all
Defined in:
lib/traject/solr_pool/connection.rb

Overview

Keyword bundle so initialize stays under the 5-param limit.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#authObject

Returns the value of attribute auth

Returns:

  • (Object)

    the current value of auth



12
13
14
# File 'lib/traject/solr_pool/connection.rb', line 12

def auth
  @auth
end

#headersObject

Returns the value of attribute headers

Returns:

  • (Object)

    the current value of headers



12
13
14
# File 'lib/traject/solr_pool/connection.rb', line 12

def headers
  @headers
end

#timeoutObject

Returns the value of attribute timeout

Returns:

  • (Object)

    the current value of timeout



12
13
14
# File 'lib/traject/solr_pool/connection.rb', line 12

def timeout
  @timeout
end

Instance Method Details

#to_pool_optsObject



13
14
15
16
17
18
# File 'lib/traject/solr_pool/connection.rb', line 13

def to_pool_opts
  opts = { headers: headers }
  opts[:auth]    = auth    if auth
  opts[:timeout] = timeout if timeout
  opts
end