Module: SolrMakr::Commands::Shared Private
- Extended by:
- ActiveSupport::Concern
- Included in:
- CreateCore, DestroyCore, ListCores, WriteYaml
- Defined in:
- lib/solr_makr/commands/shared.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #args ⇒ <String> readonly private
- #core ⇒ SolrMakr::Core readonly
- #options ⇒ Struct readonly private
- #solr_config ⇒ SolrMakr::SolrConfiguration readonly
Instance Method Summary collapse
- #run ⇒ void abstract private
- #run!(args, options) ⇒ void private
- #with_message(message, &block) ⇒ Object private
Instance Attribute Details
#args ⇒ <String> (readonly)
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.
20 21 22 |
# File 'lib/solr_makr/commands/shared.rb', line 20 def args @args end |
#core ⇒ SolrMakr::Core (readonly)
58 59 60 61 62 63 64 |
# File 'lib/solr_makr/commands/shared.rb', line 58 attr_lazy_reader :core do core_name = args[config.core_name_index] if core_name.present? || config.acts_on_single_core solr_config.core(name: core_name) end end |
#options ⇒ Struct (readonly)
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.
24 25 26 |
# File 'lib/solr_makr/commands/shared.rb', line 24 def end |
#solr_config ⇒ SolrMakr::SolrConfiguration (readonly)
16 17 18 |
# File 'lib/solr_makr/commands/shared.rb', line 16 def solr_config @solr_config end |
Instance Method Details
#run ⇒ void
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.
This method returns an undefined value.
32 33 34 |
# File 'lib/solr_makr/commands/shared.rb', line 32 def run raise NotImplementedError, "Must implement #run" end |
#run!(args, options) ⇒ void
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.
This method returns an undefined value.
37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/solr_makr/commands/shared.rb', line 37 def run!(args, ) @args = args = .default solr_config.home = .solr_home solr_config.host = .solr_host solr_config.port = .solr_port run end |
#with_message(message, &block) ⇒ 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.
66 67 68 69 70 71 72 |
# File 'lib/solr_makr/commands/shared.rb', line 66 def (, &block) retval = yield if retval != false && .verbose say end end |