class SolrMakr::SunspotConfiguration

Public Instance Methods

build_config() click to toggle source

@api private @return [ActiveSupport::HashWithIndifferentAccess]

# File lib/solr_makr/sunspot_configuration.rb, line 36
def build_config
  {}.tap do |hsh|
    hsh[environment] = {}.tap do |inner_hsh|
      inner_hsh[:solr] = attributes.slice(:hostname, :port, :log_level, :path)
    end
  end.with_indifferent_access
end
generate_path() click to toggle source

@return [String]

# File lib/solr_makr/sunspot_configuration.rb, line 45
def generate_path
  File.join('/', path_prefix, collection)
end
to_yaml(options = {}) click to toggle source

@return [String]

# File lib/solr_makr/sunspot_configuration.rb, line 28
def to_yaml(options = {})
  YAML.quick_emit self.object_id, options do |out|
    out.represent_map nil, configuration.to_hash
  end
end