るりまサーチ

最速Rubyリファレンスマニュアル検索!
429件ヒット [101-200件を表示] (0.062秒)

別のキーワード

  1. kernel $input_record_separator
  2. kernel $output_record_separator
  3. kernel $program_name
  4. kernel $last_read_line
  5. kernel $loaded_features

ライブラリ

キーワード

検索結果

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

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

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

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

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

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

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


opt でプロセス起動のためのオプションや、パイプ IO オブジェクトの属性(エンコーディングや
読み書き能力)を指定することができます。
プロセス起動のためのオプションは Kernel.#spawn と、
パイプオブジェクトの...

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

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

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

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

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

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


opt でプロセス起動のためのオプションや、パイプ IO オブジェクトの属性(エンコーディングや
読み書き能力)を指定することができます。
プロセス起動のためのオプションは Kernel.#spawn と、
パイプオブジェクトの...

IO.popen("-", mode = "r", opt={}) -> IO (6132.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
p
rint "child output: " + s
exit...
... IO オブジェクトを引数に
ブロックを実行し、その結果を返します。ブロックの実行後、生成したパイ
プは自動的にクローズされます。
子プロセスでは nil を引数にブロックを実行し終了します。

p
IO.popen("-", "r+") {|io|...
...if io # parent
io
.puts "foo"
io
.gets
else # child
s = gets
p
uts "child output: " + s
end
}
# => "child output: foo\n"

opt ではエンコーディングの設定やプロセス起動のためのオプションが指定できます。
IO
.new や Kernel.#spaw...

IO.popen("-", mode = "r", opt={}) {|io| ... } -> object (6132.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
p
rint "child output: " + s
exit...
... IO オブジェクトを引数に
ブロックを実行し、その結果を返します。ブロックの実行後、生成したパイ
プは自動的にクローズされます。
子プロセスでは nil を引数にブロックを実行し終了します。

p
IO.popen("-", "r+") {|io|...
...if io # parent
io
.puts "foo"
io
.gets
else # child
s = gets
p
uts "child output: " + s
end
}
# => "child output: foo\n"

opt ではエンコーディングの設定やプロセス起動のためのオプションが指定できます。
IO
.new や Kernel.#spaw...

IO.popen(env, "-", mode = "r", opt={}) -> IO (6132.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
p
rint "child output: " + s
exit...
... IO オブジェクトを引数に
ブロックを実行し、その結果を返します。ブロックの実行後、生成したパイ
プは自動的にクローズされます。
子プロセスでは nil を引数にブロックを実行し終了します。

p
IO.popen("-", "r+") {|io|...
...if io # parent
io
.puts "foo"
io
.gets
else # child
s = gets
p
uts "child output: " + s
end
}
# => "child output: foo\n"

opt ではエンコーディングの設定やプロセス起動のためのオプションが指定できます。
IO
.new や Kernel.#spaw...

絞り込み条件を変える

IO.popen(env, "-", mode = "r", opt={}) {|io| ... } -> object (6132.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
p
rint "child output: " + s
exit...
... IO オブジェクトを引数に
ブロックを実行し、その結果を返します。ブロックの実行後、生成したパイ
プは自動的にクローズされます。
子プロセスでは nil を引数にブロックを実行し終了します。

p
IO.popen("-", "r+") {|io|...
...if io # parent
io
.puts "foo"
io
.gets
else # child
s = gets
p
uts "child output: " + s
end
}
# => "child output: foo\n"

opt ではエンコーディングの設定やプロセス起動のためのオプションが指定できます。
IO
.new や Kernel.#spaw...

IO#puts(*obj) -> nil (6129.0)

各 obj を self に出力し、それぞれの後に改行を出力します。 引数の扱いは Kernel.#puts と同じです。詳細はこちらを参照し てください。

...いは Kernel.#puts と同じです。詳細はこちらを参照し
てください。

@param obj 出力したいオブジェクトを指定します。Kernel.#puts と同じです。

@raise IOError 自身が書き込み用にオープンされていなければ発生します。

@raise Errno::E...
...XXX 出力に失敗した場合に発生します。

$stdout.puts("this", "is", "a", "test", [1, [nil, 3]])

#=>
this
is
a
test
1

3

@see Kernel.#puts...

IO#printf(format, *arg) -> nil (6125.0)

C 言語の printf と同じように、format に従い引数 を文字列に変換して、self に出力します。

...語の printf と同じように、format に従い引数
を文字列に変換して、self に出力します。

第一引数に IO を指定できないこと、引数を省略できないことを除けば Kernel.#printf と同じです。

@param format Kernel.#printf と同じです。print_f...
...ormat を参照してください。

@param arg Kernel.#printf と同じです。

@raise IOError 自身が書き込み用にオープンされていなければ発生します。

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


@see Kernel.#printf...

IO#putc(ch) -> object (6123.0)

文字 ch を self に出力します。 引数の扱いは Kernel.#putc と同じです。詳細はこちらを参照し てください。ch を返します。

... Kernel.#putc と同じです。詳細はこちらを参照し
てください。ch を返します。

@param ch 出力したい文字を、文字列か文字コード(整数)で与えます。

@raise IOError 自身が書き込み用にオープンされていなければ発生します。

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

//emlist[例][ruby]{
$stdout.putc "A" # => A
$stdout.putc 65 # => A
//}

@see Kernel.#putc...

IO#print(*arg) -> nil (6113.0)

引数を IO ポートに順に出力します。引数を省略した場合は、$_ を出力します。

...引数を IO ポートに順に出力します。引数を省略した場合は、$_ を出力します。

@param arg Kernel.#print と同じです。

@raise IOError 自身が書き込み用にオープンされていなければ発生します。

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

//emlist[例][ruby]{
$stdout.print("This is ", 100, " percent.\n") # => This is 100 percent.
//}

@see Kernel.#print...

絞り込み条件を変える

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