Class: SolrMakr::Configuration

Inherits:
Object
  • Object
show all
Includes:
ActiveSupport::Configurable, Utility
Defined in:
lib/solr_makr/configuration.rb

Constant Summary collapse

LOOKUP_DEFAULT =
->(instance, attribute) { instance.lookup_default_for(attribute.name) }

Constants included from Utility

Utility::REQUIRED_SOLR_NODES

Instance Method Summary collapse

Methods included from Utility

default_table, default_table_options!, hash_to_table, looks_like_a_valid_configset?, path_to_configset

Instance Method Details

#lookup_default_for(attribute_name) ⇒ Object

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.



32
33
34
# File 'lib/solr_makr/configuration.rb', line 32

def lookup_default_for(attribute_name)
  config[:"default_#{attribute_name}"]
end

#solr_uriObject



23
24
25
# File 'lib/solr_makr/configuration.rb', line 23

def solr_uri
  "#{solr_host}:#{solr_port}/#{solr_path}"
end

#to_tableObject



27
28
29
# File 'lib/solr_makr/configuration.rb', line 27

def to_table
  hash_to_table attributes, width: false
end

#with_zookeeper {|zookeeper| ... } ⇒ void

This method returns an undefined value.

Yield Parameters:

  • zookeeper (ZK::Client::Threaded)

Yield Returns:

  • (void)


39
40
41
42
43
# File 'lib/solr_makr/configuration.rb', line 39

def with_zookeeper(&block)
  ZK.open(zookeeper) do |client|
    yield client if block_given?
  end
end