Method: Bio::Command.query_command
- Defined in:
- lib/bio/command.rb
.query_command(cmd, query = nil, options = {}) ⇒ Object
Executes the program with the query (String) given to the standard input, waits the program termination, and returns the output data printed to the standard output as a string.
Automatically select popen for Windows environment and fork for the others.
Available options:
:chdir => "path" : changes working directory to the specified path.
Arguments:
-
(required) cmd: Array containing String objects
-
(optional) query: String
-
(optional) options: Hash
- Returns
-
String or nil
254 255 256 257 258 259 260 261 |
# File 'lib/bio/command.rb', line 254 def query_command(cmd, query = nil, = {}) case RUBY_PLATFORM when /mswin32|bccwin32/ query_command_popen(cmd, query, ) else query_command_fork(cmd, query, ) end end |