Method: Bio::Command.call_command

Defined in:
lib/bio/command.rb

.call_command(cmd, options = {}, &block) ⇒ Object

Executes the program. Automatically select popen for Windows environment and fork for the others. A block must be given. An IO object is passed to the block.

Available options:

:chdir => "path" : changes working directory to the specified path.

Arguments:

  • (required) cmd: Array containing String objects

  • (optional) options: Hash

Returns

(undefined)



145
146
147
148
149
150
151
152
# File 'lib/bio/command.rb', line 145

def call_command(cmd, options = {}, &block) #:yields: io
  case RUBY_PLATFORM
  when /mswin32|bccwin32/
    call_command_popen(cmd, options, &block)
  else
    call_command_fork(cmd, options, &block)
  end
end