るりまサーチ

最速Rubyリファレンスマニュアル検索!
319件ヒット [1-100件を表示] (0.078秒)

別のキーワード

  1. _builtin gets
  2. irb/input-method gets
  3. io gets
  4. argf.class gets
  5. csv gets

ライブラリ

クラス

オブジェクト

キーワード

検索結果

<< 1 2 3 ... > >>

WEBrick::NullReader.gets(*args) -> nil (18102.0)

常に nil を返します。

常に nil を返します。

Socket.getservbyname(service, proto = "tcp") -> Integer (6101.0)

service, protoに対応するポート番号を返 します。protoの省略値は"tcp"です。

service, protoに対応するポート番号を返
します。protoの省略値は"tcp"です。

@param service サービス名を文字列で指定します。例えば、"ftp", "telnet" が相当します。
@param proto プロトコル名を文字列で指定します。省略値は"tcp" です。

@return ポート番号を整数で返します。

Socket.getservbyport(port, protocol_name="tcp") -> String (6101.0)

ポート番号に対応するサービスの正式名を返します。

...す。

@param port ポート番号
@param protocol_name "tcp" や "udp" などのプロトコル名
@return サービスの正式名

require 'socket'

Socket.getservbyport(80) #=> "www"
Socket.getservbyport(514, "tcp") #=> "shell"
Socket.getservbyport(514, "udp") #=> "syslog"...

WEBrick::NullReader.read(*args) -> nil (3002.0)

常に nil を返します。

常に nil を返します。

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

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

...では
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 "child output: " + s
exit
end

ブロックを与えられた場合、親プロセス...
...にブロックを実行し終了します。

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.popen("-", mode = "r", opt={}) {|io| ... } -> object (27.0)

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

...では
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 "child output: " + s
exit
end

ブロックを与えられた場合、親プロセス...
...にブロックを実行し終了します。

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.popen(env, "-", mode = "r", opt={}) -> IO (27.0)

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

...では
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 "child output: " + s
exit
end

ブロックを与えられた場合、親プロセス...
...にブロックを実行し終了します。

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.popen(env, "-", mode = "r", opt={}) {|io| ... } -> object (27.0)

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

...では
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 "child output: " + s
exit
end

ブロックを与えられた場合、親プロセス...
...にブロックを実行し終了します。

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.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通りあります。文字列を指定する場合と配列を指定...
...後、生成したパイ
プは自動的にクローズされます。

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


opt でプロセス起動のためのオプションや、パイプ IO オブジェクトの属性(エンコーディングや...

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通りあります。文字列を指定する場合と配列を指定...
...後、生成したパイ
プは自動的にクローズされます。

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


opt でプロセス起動のためのオプションや、パイプ IO オブジェクトの属性(エンコーディングや...

絞り込み条件を変える

<< 1 2 3 ... > >>