Class: Minionizer::CommandExecution

Inherits:
Object
  • Object
show all
Defined in:
lib/minionizer/command_execution.rb

Defined Under Namespace

Classes: CommandError, InvocationError

Instance Attribute Summary collapse

Instance Method Summary collapse

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, options={})
  @connection = connection
  @command = command
  @options = options
end

Instance Attribute Details

#commandObject (readonly)

Returns the value of attribute command.



7
8
9
# File 'lib/minionizer/command_execution.rb', line 7

def command
  @command
end

#connectionObject (readonly)

Returns the value of attribute connection.



7
8
9
# File 'lib/minionizer/command_execution.rb', line 7

def connection
  @connection
end

#optionsObject (readonly)

Returns the value of attribute options.



7
8
9
# File 'lib/minionizer/command_execution.rb', line 7

def options
  @options
end

Instance Method Details

#callObject



15
16
17
18
19
# File 'lib/minionizer/command_execution.rb', line 15

def call
  execute_command
  check_exit_code
  return results
end