Class: SolrWrapper::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/solr_wrapper/runner.rb

Overview

An abstract class for running commands in the shell

Direct Known Subclasses

Popen4Runner, PopenRunner

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cmd, options, config) ⇒ Runner

Returns a new instance of Runner.



4
5
6
7
8
9
# 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

Instance Attribute Details

#cmdObject (readonly)

Returns the value of attribute cmd.



11
12
13
# File 'lib/solr_wrapper/runner.rb', line 11

def cmd
  @cmd
end

#configObject (readonly)

Returns the value of attribute config.



11
12
13
# File 'lib/solr_wrapper/runner.rb', line 11

def config
  @config
end

#optionsObject (readonly)

Returns the value of attribute options.



11
12
13
# File 'lib/solr_wrapper/runner.rb', line 11

def options
  @options
end

Instance Method Details

#silence_output?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/solr_wrapper/runner.rb', line 13

def silence_output?
  @silence_output
end