Class: ShellRunner

Inherits:
Object
  • Object
show all
Defined in:
lib/procon_bypass_man/support/shell_runner.rb

Class Method Summary collapse

Class Method Details

.execute(command, stdout: true) ⇒ void

This method returns an undefined value.

Parameters:

  • command (String)
  • stdout (Boolean) (defaults to: true)


5
6
7
8
9
10
# File 'lib/procon_bypass_man/support/shell_runner.rb', line 5

def self.execute(command, stdout: true)
  system(command) # TODO: ここでエラーが起きたときに、エラーをログに出力する
  if stdout
    ProconBypassMan.logger.info("[SHELL]: #{command}")
  end
end