Class: Puppet_X::Coi::Jboss::Internal::Executor::ShellExecutor

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet_x/coi/jboss/internal/executor/shell_executor.rb

Overview

Class that handles shell command execution

Instance Method Summary collapse

Instance Method Details

#child_statusProcess::Status

Method to check return code from last command that was executed

Returns:

  • (Process::Status)

    result of last command



13
14
15
# File 'lib/puppet_x/coi/jboss/internal/executor/shell_executor.rb', line 13

def child_status
  $CHILD_STATUS
end

#run_command(cmd) ⇒ Object

Method that executes method by real system command execution

Parameters:

  • cmd (String)

    command that will be executed



7
8
9
# File 'lib/puppet_x/coi/jboss/internal/executor/shell_executor.rb', line 7

def run_command(cmd)
  `#{cmd}`
end