Class: Terrapin::CommandLine::PopenRunner

Inherits:
Object
  • Object
show all
Defined in:
lib/terrapin/command_line/runners/popen_runner.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.supported?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/terrapin/command_line/runners/popen_runner.rb', line 6

def self.supported?
  true
end

Instance Method Details

#call(command, env = {}, options = {}) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/terrapin/command_line/runners/popen_runner.rb', line 14

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?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/terrapin/command_line/runners/popen_runner.rb', line 10

def supported?
  self.class.supported?
end