Module: SubshellCommand

Defined in:
lib/subshell_command.rb

Defined Under Namespace

Classes: CombinedOutputStreamsExecutor, Command, CommandExecutor, Result, StandardOutputStreamsExecutor

Class Method Summary collapse

Class Method Details

.execute(command_string = nil, &block) ⇒ Object



135
136
137
138
139
# File 'lib/subshell_command.rb', line 135

def execute(command_string = nil, &block)
  command = Command.new(command_string)
  block.call(command) if block_given?
  CommandExecutor.new(command).execute
end