Class: BigBrother::ShellExecutor
- Inherits:
-
Object
- Object
- BigBrother::ShellExecutor
- Defined in:
- lib/big_brother/shell_executor.rb
Instance Method Summary collapse
Instance Method Details
#_system(command) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/big_brother/shell_executor.rb', line 8 def _system(command) current_fiber = Fiber.current EventMachine.system(command) do |output, status| current_fiber.resume(output, status.exitstatus) end return Fiber.yield end |
#invoke(command) ⇒ Object
3 4 5 6 |
# File 'lib/big_brother/shell_executor.rb', line 3 def invoke(command) BigBrother.logger.info("Running command: #{command.inspect}") _system(command) end |