るりまサーチ (Ruby 2.5.0)

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.045秒)
トップページ > バージョン:2.5.0[x] > クエリ:y[x] > クエリ:*[x] > クラス:Shell::CommandProcessor[x]

別のキーワード

  1. psych psych_y
  2. psych y
  3. kernel y
  4. kernel psych_y
  5. y

ライブラリ

キーワード

検索結果

Shell::CommandProcessor#system(command, *opts) -> Shell::SystemCommand (18907.0)

command を実行する.

command を実行する.

@param command 実行するコマンドのパスを文字列で指定します。

@param opts command のオプションを文字列で指定します。複数可。

使用例:

require 'shell'
Shell.verbose = false
sh = Shell.new

print sh.system("ls", "-l")
Shell.def_system_command("head")
sh.system("ls", "-l") | sh.head("-n 3") > STDOUT

Shell::CommandProcessor#notify(*opts) { ... } -> () (18604.0)

@todo

@todo

Shell::CommandProcessor#mkdir(*path) -> Array (604.0)

Dir.mkdirと同じです。 (複数可)

Dir.mkdirと同じです。 (複数可)

@param path 作成するディレクトリ名を文字列で指定します。

@return 作成するディレクトリの一覧の配列を返します。

使用例
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
p sh.mkdir("foo") #=> ["foo"]
rescue => err
puts err
end