るりまサーチ

最速Rubyリファレンスマニュアル検索!
861件ヒット [201-300件を表示] (0.091秒)

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

クラス

モジュール

キーワード

検索結果

<< < 1 2 3 4 5 ... > >>

IO.popen(env = {}, [[cmdname, arg0], *args, execopt={}], mode = "r", opt={}) {|f| ... } -> object (14116.0)

サブプロセスを実行し、そのプロセスの標準入出力 との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

...入出力
との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

p io = IO.popen("cat", "r+") # => #<IO:fd 4>
io.puts "foo"
io.close_write
p io.gets # => "foo\n"

サブプロセスを指定する方法...
...ブロックの実行結果を返します。ブロックの実行後、生成したパイ
プは自動的にクローズされます。

p IO.popen("cat", "r+") {|io|
io.puts "foo"
io.close_write
io.gets
}
# => "foo\n"


opt でプロセス起動のためのオプションや、...
...

# nkfプロセスから得られる文字列を EUC-JP と指定する
# IO.new などと共通のオプションが指定できる
IO.popen("nkf -e filename", external_encoding: "EUC-JP"){|nkf_io|
nkf_io.read
}

これに加えて、プロセス起動のためのオプションを...

IO.popen(env = {}, [cmdname, *args, execopt={}], mode = "r", opt={}) -> IO (14116.0)

サブプロセスを実行し、そのプロセスの標準入出力 との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

...入出力
との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

p io = IO.popen("cat", "r+") # => #<IO:fd 4>
io.puts "foo"
io.close_write
p io.gets # => "foo\n"

サブプロセスを指定する方法...
...ブロックの実行結果を返します。ブロックの実行後、生成したパイ
プは自動的にクローズされます。

p IO.popen("cat", "r+") {|io|
io.puts "foo"
io.close_write
io.gets
}
# => "foo\n"


opt でプロセス起動のためのオプションや、...
...

# nkfプロセスから得られる文字列を EUC-JP と指定する
# IO.new などと共通のオプションが指定できる
IO.popen("nkf -e filename", external_encoding: "EUC-JP"){|nkf_io|
nkf_io.read
}

これに加えて、プロセス起動のためのオプションを...

IO.popen(env = {}, [cmdname, *args, execopt={}], mode = "r", opt={}) {|f| ... } -> object (14116.0)

サブプロセスを実行し、そのプロセスの標準入出力 との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

...入出力
との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

p io = IO.popen("cat", "r+") # => #<IO:fd 4>
io.puts "foo"
io.close_write
p io.gets # => "foo\n"

サブプロセスを指定する方法...
...ブロックの実行結果を返します。ブロックの実行後、生成したパイ
プは自動的にクローズされます。

p IO.popen("cat", "r+") {|io|
io.puts "foo"
io.close_write
io.gets
}
# => "foo\n"


opt でプロセス起動のためのオプションや、...
...

# nkfプロセスから得られる文字列を EUC-JP と指定する
# IO.new などと共通のオプションが指定できる
IO.popen("nkf -e filename", external_encoding: "EUC-JP"){|nkf_io|
nkf_io.read
}

これに加えて、プロセス起動のためのオプションを...

IO.popen(env = {}, command, mode = "r", opt={}) -> IO (14116.0)

サブプロセスを実行し、そのプロセスの標準入出力 との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

...入出力
との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

p io = IO.popen("cat", "r+") # => #<IO:fd 4>
io.puts "foo"
io.close_write
p io.gets # => "foo\n"

サブプロセスを指定する方法...
...ブロックの実行結果を返します。ブロックの実行後、生成したパイ
プは自動的にクローズされます。

p IO.popen("cat", "r+") {|io|
io.puts "foo"
io.close_write
io.gets
}
# => "foo\n"


opt でプロセス起動のためのオプションや、...
...

# nkfプロセスから得られる文字列を EUC-JP と指定する
# IO.new などと共通のオプションが指定できる
IO.popen("nkf -e filename", external_encoding: "EUC-JP"){|nkf_io|
nkf_io.read
}

これに加えて、プロセス起動のためのオプションを...

IO.popen(env = {}, command, mode = "r", opt={}) {|f| ... } -> object (14116.0)

サブプロセスを実行し、そのプロセスの標準入出力 との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

...入出力
との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

p io = IO.popen("cat", "r+") # => #<IO:fd 4>
io.puts "foo"
io.close_write
p io.gets # => "foo\n"

サブプロセスを指定する方法...
...ブロックの実行結果を返します。ブロックの実行後、生成したパイ
プは自動的にクローズされます。

p IO.popen("cat", "r+") {|io|
io.puts "foo"
io.close_write
io.gets
}
# => "foo\n"


opt でプロセス起動のためのオプションや、...
...

# nkfプロセスから得られる文字列を EUC-JP と指定する
# IO.new などと共通のオプションが指定できる
IO.popen("nkf -e filename", external_encoding: "EUC-JP"){|nkf_io|
nkf_io.read
}

これに加えて、プロセス起動のためのオプションを...

絞り込み条件を変える

IO.popen(env, "-", mode = "r", opt={}) -> IO (14116.0)

第一引数に文字列 "-" が指定された時、fork(2) を 行い子プロセスの標準入出力との間にパイプラインを確立します。 親プロセスでは IO オブジェクトを返し、子プロセスでは nil を返します。

...プラインを確立します。
親プロセスでは IO オブジェクトを返し、子プロセスでは
nil を返します。

io = IO.popen("-", "r+")
if io # parent
io.puts "foo"
p io.gets # => "child output: foo\n"
io.close
else # child
s = gets...
...たパイ
プは自動的にクローズされます。
子プロセスでは nil を引数にブロックを実行し終了します。

p IO.popen("-", "r+") {|io|
if io # parent
io.puts "foo"
io.gets
else # child
s = gets
puts "child output: " + s
end...
...プンする IO ポートのモードを指定します。mode の詳細は Kernel.#open 参照して下さい。
@param opt エンコーディングなどを設定するオプション引数(see IO.new)

@raise Errno::EXXX パイプ、あるいは子プロセスの生成に失敗した場合に発...

IO.popen(env, "-", mode = "r", opt={}) {|io| ... } -> object (14116.0)

第一引数に文字列 "-" が指定された時、fork(2) を 行い子プロセスの標準入出力との間にパイプラインを確立します。 親プロセスでは IO オブジェクトを返し、子プロセスでは nil を返します。

...プラインを確立します。
親プロセスでは IO オブジェクトを返し、子プロセスでは
nil を返します。

io = IO.popen("-", "r+")
if io # parent
io.puts "foo"
p io.gets # => "child output: foo\n"
io.close
else # child
s = gets...
...たパイ
プは自動的にクローズされます。
子プロセスでは nil を引数にブロックを実行し終了します。

p IO.popen("-", "r+") {|io|
if io # parent
io.puts "foo"
io.gets
else # child
s = gets
puts "child output: " + s
end...
...プンする IO ポートのモードを指定します。mode の詳細は Kernel.#open 参照して下さい。
@param opt エンコーディングなどを設定するオプション引数(see IO.new)

@raise Errno::EXXX パイプ、あるいは子プロセスの生成に失敗した場合に発...

IO#reopen(path) -> self (14114.0)

path で指定されたファイルにストリームを繋ぎ換えます。

...

@param path パスを表す文字列を指定します。

@param mode パスを開く際のモードを文字列で指定します。

@raise Errno::EXXX 失敗した場合に発生します。

//emlist[例][ruby]{
IO.write("testfile", "This is line one\nThis is line two\n")
f1 = File.new("te...
...int("This is line three\n")
f2.readlines # => ["This is line one\n", "This is line two\n"]
f1.close
f2.reopen("testfile", "r") # => #<File:testfile>
f2.readlines # => ["This is line one\n", "This is line two\n", "This is line three\n"]
f2.close
//}

@see Kernel.#open...

IO#reopen(path, mode) -> self (14114.0)

path で指定されたファイルにストリームを繋ぎ換えます。

...

@param path パスを表す文字列を指定します。

@param mode パスを開く際のモードを文字列で指定します。

@raise Errno::EXXX 失敗した場合に発生します。

//emlist[例][ruby]{
IO.write("testfile", "This is line one\nThis is line two\n")
f1 = File.new("te...
...int("This is line three\n")
f2.readlines # => ["This is line one\n", "This is line two\n"]
f1.close
f2.reopen("testfile", "r") # => #<File:testfile>
f2.readlines # => ["This is line one\n", "This is line two\n", "This is line three\n"]
f2.close
//}

@see Kernel.#open...

IO#reopen(io) -> self (14104.0)

自身を指定された io に繋ぎ換えます。

自身を指定された io に繋ぎ換えます。

クラスも io に等しくなることに注意してください。
IO#pos, IO#lineno などは指定された io と等しくなります。

@param io 自身を繋ぎ換えたい IO オブジェクトを指定します。

@raise IOError 指定された io が close されている場合に発生します。

絞り込み条件を変える

<< < 1 2 3 4 5 ... > >>