Class: Minionizer::CommandExecution
- Inherits:
-
Object
- Object
- Minionizer::CommandExecution
- Defined in:
- lib/minionizer/command_execution.rb
Defined Under Namespace
Classes: CommandError, InvocationError
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#connection ⇒ Object
readonly
Returns the value of attribute connection.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(connection, command, options = {}) ⇒ CommandExecution
constructor
A new instance of CommandExecution.
Constructor Details
#initialize(connection, command, options = {}) ⇒ CommandExecution
Returns a new instance of CommandExecution.
9 10 11 12 13 |
# File 'lib/minionizer/command_execution.rb', line 9 def initialize(connection, command, ={}) @connection = connection @command = command @options = end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
7 8 9 |
# File 'lib/minionizer/command_execution.rb', line 7 def command @command end |
#connection ⇒ Object (readonly)
Returns the value of attribute connection.
7 8 9 |
# File 'lib/minionizer/command_execution.rb', line 7 def connection @connection end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
7 8 9 |
# File 'lib/minionizer/command_execution.rb', line 7 def @options end |
Instance Method Details
#call ⇒ Object
15 16 17 18 19 |
# File 'lib/minionizer/command_execution.rb', line 15 def call execute_command check_exit_code return results end |