るりまサーチ (Ruby 2.4.0)

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

別のキーワード

  1. _builtin each_object
  2. objectspace each_object
  3. json object
  4. object send
  5. object to_enum

ライブラリ

検索結果

Shell::CommandProcessor#transact { ... } -> object (307.0)

ブロック中で shell を self として実行します。

ブロック中で shell を self として実行します。

例:

require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact{
system("ls", "-l") | head > STDOUT
# transact の中では、
# sh.system("ls", "-l") | sh.head > STDOUT と同じとなる。
}