るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.016秒)
トップページ > バージョン:2.6.0[x] > 種類:インスタンスメソッド[x] > クエリ:object[x] > クエリ:transact[x] > ライブラリ:shell/command-processor[x]

別のキーワード

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

クラス

検索結果

Shell::CommandProcessor#transact { ... } -> object (54652.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 と同じとなる。
}