るりまサーチ

最速Rubyリファレンスマニュアル検索!
275件ヒット [1-100件を表示] (0.017秒)
トップページ > クラス:IO[x] > クエリ:puts[x] > 種類:特異メソッド[x]

別のキーワード

  1. _builtin puts
  2. csv puts
  3. stringio puts
  4. io puts
  5. xmp puts

ライブラリ

キーワード

検索結果

<< 1 2 3 > >>

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

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

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

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

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

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

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

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

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

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

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

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

IO.binwrite(path, string, offset=nil) -> Integer (20.0)

path で指定されるファイルを開き、string を書き込み、 閉じます。

...書き込み、
閉じます。

ファイルを開くときの mode が "rb:ASCII-8BIT" で、バイナリモードが有効
である点以外は IO.write と同じです。

Kernel.#open と同様 path の先頭が "|" ならば、"|" に続くコマンドを実行し、コマンドの出力を...
...: どの環境でも同じ。
puts
png[0...16].unpack('C*').map {|c| '%02x' % c }.join(' ')
# => 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52

# binwriteを使用した場合: どの環境でも正しく保存できる。
IO
.binwrite('white.binmode.png', png)
puts
IO.binread('white.binmode.png',...
...
IO
.write('white.txtmode.png', png)
puts
IO.binread('white.txtmode.png', 16).unpack('C*').map {|c| '%02x' % c }.join(' ')
# => 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 (Linux/Macの場合
# => 89 50 4e 47 0d 0d 0a 1a 0d 0a 00 00 00 0d 49 48 (Windowsの場合
//}

@see c:IO#io_binmode, IO.w...

絞り込み条件を変える

IO.popen([env = {}, [cmdname, arg0], *args, execopt={}], mode = "r", opt={}) -> IO (17.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
}
#...
...ョンや、パイプ IO オブジェクトの属性(エンコーディングや
読み書き能力)を指定することができます。
プロセス起動のためのオプションは Kernel.#spawn と、
パイプオブジェクトの属性の指定のオプションは IO.new と共通です...

IO.popen([env = {}, [cmdname, arg0], *args, execopt={}], mode = "r", opt={}) {|f| ... } -> object (17.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
}
#...
...ョンや、パイプ IO オブジェクトの属性(エンコーディングや
読み書き能力)を指定することができます。
プロセス起動のためのオプションは Kernel.#spawn と、
パイプオブジェクトの属性の指定のオプションは IO.new と共通です...

IO.popen([env = {}, cmdname, *args, execopt={}], mode = "r", opt={}) -> IO (17.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
}
#...
...ョンや、パイプ IO オブジェクトの属性(エンコーディングや
読み書き能力)を指定することができます。
プロセス起動のためのオプションは Kernel.#spawn と、
パイプオブジェクトの属性の指定のオプションは IO.new と共通です...

IO.popen([env = {}, cmdname, *args, execopt={}], mode = "r", opt={}) {|f| ... } -> object (17.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
}
#...
...ョンや、パイプ IO オブジェクトの属性(エンコーディングや
読み書き能力)を指定することができます。
プロセス起動のためのオプションは Kernel.#spawn と、
パイプオブジェクトの属性の指定のオプションは IO.new と共通です...

IO.popen(env = {}, [[cmdname, arg0], *args, execopt={}], mode = "r", opt={}) -> IO (17.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
}
#...
...ョンや、パイプ IO オブジェクトの属性(エンコーディングや
読み書き能力)を指定することができます。
プロセス起動のためのオプションは Kernel.#spawn と、
パイプオブジェクトの属性の指定のオプションは IO.new と共通です...

絞り込み条件を変える

<< 1 2 3 > >>