class SolrWrapper::Runner
An abstract class for running commands in the shell
Attributes
cmd[R]
config[R]
options[R]
Public Class Methods
new(cmd, options, config)
click to toggle source
# File lib/solr_wrapper/runner.rb, line 4 def initialize(cmd, options, config) @cmd = cmd @silence_output = !options.delete(:output) @options = options @config = config end
Public Instance Methods
silence_output?()
click to toggle source
# File lib/solr_wrapper/runner.rb, line 13 def silence_output? @silence_output end
Private Instance Methods
argument_list()
click to toggle source
# File lib/solr_wrapper/runner.rb, line 19 def argument_list [config.solr_binary, cmd] + config.solr_options.merge(options).map do |k, v| case v when true "-#{k}" when false, nil nil else ["-#{k}", v.to_s] end end.flatten.compact end