class Cocaine::CommandLine::PopenRunner
Public Class Methods
supported?()
click to toggle source
# File lib/cocaine/command_line/runners/popen_runner.rb, line 5 def self.supported? true end
Public Instance Methods
call(command, env = {}, options = {})
click to toggle source
# File lib/cocaine/command_line/runners/popen_runner.rb, line 13 def call(command, env = {}, options = {}) with_modified_environment(env) do IO.popen(command, "r", options) do |pipe| Output.new(pipe.read) end end end
supported?()
click to toggle source
# File lib/cocaine/command_line/runners/popen_runner.rb, line 9 def supported? self.class.supported? end
Private Instance Methods
with_modified_environment(env, &block)
click to toggle source
# File lib/cocaine/command_line/runners/popen_runner.rb, line 23 def with_modified_environment(env, &block) ClimateControl.modify(env, &block) end