Class: SolrMakr::Commands::FetchCollectionList Private

Inherits:
ActiveInteraction::Base
  • Object
show all
Includes:
AbstractCommand
Defined in:
lib/solr_makr/commands/fetch_collection_list.rb

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

Constant Summary

Constants included from Utility

Utility::REQUIRED_SOLR_NODES

Instance Attribute Summary

Attributes included from BufferInteraction

#buffer

Instance Method Summary collapse

Methods included from AbstractCommand

#expect_success!, #fetch_configset, #local_configuration

Methods included from Utility

default_table, default_table_options!, hash_to_table, looks_like_a_valid_configset?, path_to_configset

Methods included from BufferInteraction

#build_buffer, #compose_buffer

Instance Method Details

#executeObject

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.



6
7
8
9
10
11
12
13
14
# File 'lib/solr_makr/commands/fetch_collection_list.rb', line 6

def execute
  response = solr_client.list

  collections = response.array(:collections).map do |name|
    SolrMakr::Collection.new name: name
  end

  buffer.print default_table(collection: collections, headings: %w[Collection Managed?], if_blank: 'No collections.')
end